2

What I am trying to accomplish is to get item information from the internal ID passed to getAttribute but I am getting the following error.

Error processing dynamic tag getAttribute('item',362,'storedisplayname') : id paramter 2 must be an integer

Here is a sample of the code:

var itemIntId = 362;
var id = "<%=getAttribute('item',"+itemIntId+",'storedisplayname')%>";
console.log("ID: " + id);

Doing the following does not seem to change anything as it still gives me the same error

var id = "<%=declareAttribute('item',"+itemIntId+",'storedisplayname')%>";
console.log("ID: " + id);

This is in a presentation tab page and found the following info in the Netsuite help section

getAttribute tag on Presentation tab throws error Sometimes using the getAttribute() tag in a Presentation tab can throw error %u2018Error processing dynamic tag getAttribute('item',9047,'storeurl') %u2018. In that case you have to use declareAttribute() to display the embedded tag on your Presentation tab. On the Presentation tab > Meta Tag HTML area, just add:

<%=declareAttribute('item',9047,'storeurl')%>

but did not seem to help

I'm sure I am just missing something simple but have been bashing my head against my desk for a few hours now trying to figure this out and

4

1 回答 1

0

在与 Netsuite 支持讨论并在代码上来回讨论之后,似乎 getAttribute 或 declareAttribute 不能从 JavaScript 中获取动态变量。不知道为什么它仍然是一个 int 但我想它就是它。

于 2014-05-08T15:53:22.033 回答