This topic contains 5 replies, has 0 voices, and was last updated by jt55401 7 years, 9 months ago.
-
AuthorPosts
-
January 27, 2017 at 10:13 am #1240
jt55401I have a User Event Script setup to “listen” for changes in Vendor and Contact records using only the afterSubmit handler.If I open a contact or vendor and make changes, the events fire properly. That’s great.
If I open the vendor and attach or remove a contact with that vendor, no event is fired for either the vendor or the contact.What mechanic is preventing events from firing in this case, and is there anything I can do to get the events to fire?
This is a cached copy. Click here to see the original post. -
January 30, 2017 at 3:20 am #1241
j.jto my knowledge there is no event fired for attaching/deattaching of records and this is logged as an enhancement in NetSuite.
-
January 30, 2017 at 7:23 am #1242
khultquistThe user event will trigger anytime that the record is saved. Like j.j says, the linking of records doesn’t trigger a user event, because the record is not saved.
If you really need this, you should be able to discover changes with a scheduled script that looks for changes in attachments/detachments. The script would run every 15 minutes.
-
January 31, 2017 at 9:35 am #1243
jt55401Thank you khultquist – can you give me a hint as to what that script would look like? Are you suggesting a script that would loop through every record, and “peek” into it’s history of attachments/detachments somehow? (sorry if that’s a silly or easy question – I’m new to NetSuite…)
or do I need to somehow track the attachments/detachments?
-
January 31, 2017 at 11:57 am #1244
khultquistnp… I haven’t thought this out all the way but here’s how I would attempt it:add a custom field to vendor records (and maybe other entity records)
put a value in this field, a key, generated by some function of all the contacts attached to this record (eg the product of the internalids of all contacts, though this is not unique)
build a saved search that compares the key (stored on the record) to the function — any changes to attachments on a record will show up in this search
run a scheduled script that updates the keys on results of the saved search -
January 31, 2017 at 2:33 pm #1245
jt55401khultquist – sure, thanks for the tips!
-
AuthorPosts
You must be logged in to reply to this topic.