This topic contains 6 replies, has 0 voices, and was last updated by sveselinovic2621 8 years, 1 month ago.
-
AuthorPosts
-
July 25, 2016 at 2:04 am #6301
sveselinovic2621Hi all,
I have a requirement where I need to trigger some code when a record is created via the nlapiTransformRecord call. This in particular applies to the ‘Item Fulfillment’ record.
I apologize if this is a duplication post, which i’m sure it is. Any advice on how to achieve this? The typical user event to create event is not triggering, like it does on other records.
For example:
var itemFulfillment = nlapiTransformRecord(‘salesorder’, recordId, ‘itemfulfillment’);
nlapiSubmitRecord(itemFulfillment); // This is a cached copy. Click here to see the original post.
-
July 25, 2016 at 5:12 am #6302
Olivier Gagnon NCYou need to execute the nlapiSubmitRecord from either a Scheduled Script or a Suitelet/Restlet. User Event and client scripts do not trigger scripting on the target record when they submit.
sveselinovic2621 replied on 07/25/2016, 11:32 AM: Thank you Oliver,
Unfortunately we are not the ones performing this call, our warehousing software provider, WMS, is. Are there any workarounds to this?
/sv
-
July 25, 2016 at 11:53 am #6303
khultquistOne workaround idea: if you can wait up to 15 minutes, you can run a scheduled script and get the trigger to fire.
You might also be able to deploy/schedule a scheduled script from your user event.
-
July 25, 2016 at 2:13 pm #6304
Olivier Gagnon NCYeah I agree with khultquist, that’s the only workaround I see. You’ll need to have a schedule script edit/save all your records. It’s a really, really bad workaround, but if that’s all you got to work with, it’ll do. You may need to recode some of your script though, for example if you have logic that needs to run on create only. Technically while coming in as an edit, the scheduled script would be the first execution for these records and so should be considered a ‘create’. So, you’ll need to consider that.
-
July 26, 2016 at 12:37 am #6305
pcutlerSince this is third party code, check if the third party code is taking any other actions that trigger other UE scripts. If so, you may be able to piggy-back off of those.
Also, if the 15 minute wait time is unreasonable, you can have an external process that calls a restlet at the frequency of your choosing.
-
September 20, 2016 at 11:52 am #6306
david.mendozaI have a similar problem with WMS, in which workflows or user events are not firing after the Item Fulfillment record is created.
When the Item Fulfillment record is created via WMS, the context is “Script (Suitelet).”
Any inputs?
-
September 27, 2016 at 5:56 pm #6307
sveselinovic2621Originally posted by david.mendoza
View Post
I have a similar problem with WMS, in which workflows or user events are not firing after the Item Fulfillment record is created.
When the Item Fulfillment record is created via WMS, the context is “Script (Suitelet).”
Any inputs?
Hey David,
Interestingly enough, I ended up piggybacking off of the actual Ship Manifest Record. The item fulfillment record we needed was created after the ‘PACK’ procedure, if you’re outside of the ERP system. I was able to accomplish what i needed doing the following.
Upon WMS Ship Manifest After Submit (post-committal), find all of the item fulfillment records I need to work with
Build an object containing my data points
Do stuff [for the lack of a better term]
Best of luck
-
AuthorPosts
You must be logged in to reply to this topic.