This topic contains 6 replies, has 0 voices, and was last updated by jatm@cm 6 years, 12 months ago.
-
AuthorPosts
-
November 16, 2017 at 2:57 am #21498
jatm@cmHave a fairly simple script setting the line level location on items within a transaction based on a few parameters (example of the line set below but it is simple).
This is triggered by an on entry workflow action. Which is absolutely fine for the main subsidiary (UK), however for the other subsidiary (US) the script runs (and logs and returns a value) however the lines are not set.
I cannot understand how the script runs fine for one subsidiary but for the other seemingly it just doesn't commit the lines?
Is there some quirk I am missing ?
Code:
for(i=1; nlapiGetLineItemCount('item')>=i;i++)
{
nlapiSelectLineItem('item',i);
nlapiSetCurrentLineItemValue('item', 'location', loc , false, true );
nlapiCommitLineItem('item');
}
This is a cached copy. Click here to see the original post. -
November 16, 2017 at 2:51 pm #21499
mwhite@hgyp.comIs it running as Administrator? I had this problem when the user's permissions didn't allow them to see the location or subsidiary in question.
-
November 17, 2017 at 4:01 am #21500
jatm@cmYes it is running as Admin, and audience is set to all Subsidiaries.
Oddly I have noticed similar behavior on another workflow action, it executes without issue for the main subsidiary but does not run properly for the other subsidiaries.
Feel like there is either something odd about the behaviour for a non main subsidiary or I am missing something blindingly obvious…
-
November 17, 2017 at 6:39 am #21501
mwhite@hgyp.comI'm doing this with a user event script (no workflow) that fires on field change. It's been pretty solid.
-
November 17, 2017 at 7:16 am #21502
jatm@cmThere is a backup to set the lines but the issue is that there is further automation on the orders and the location needs to be set on creation.
-
November 18, 2017 at 12:46 am #21503
pcutlerIs the line-level location field applied to the custom form used by one subsidiary and not the other?
-
November 20, 2017 at 2:09 am #21504
jatm@cmOriginally posted by pcutler
View Post
Is the line-level location field applied to the custom form used by one subsidiary and not the other?
Yes but they each have their own locations, with the location variable being determined by the subsidiary.
What I am seeing is if a script is run on the non main subsidiary during creation it doesn't set the values, if the same script is run either; not during creation (eg Schedule or UI) or during creation but on the main subsidiary it does work as expected.
-
AuthorPosts
You must be logged in to reply to this topic.