Hello Everyone, I have write a user event script ...
# suitescript
s
Hello Everyone, I have write a user event script on customer record which get executed when anyone try to change the default shipping address of customer and sent email to the administrator. and this script is working fine. But I want that this script will also execute from the sales order, when anyone try to chnge the customer address from the sales order of that customer. But the issue is that from the sales order the UE script of customer cannot get executed then how to make this possible does anyone know ??
m
If I understand what you mean you might want to create a custom module with the similar code that would work between the 2 record types. Then you would load this module onto both scripts and call the shared method.
☝️ 1
s
Yes I want my userEvent Script on customer gets executed from the sales order of that customer also.
z
FIRST NETSUITE LOW: User events are executed only on the first level and will not be triggered from changes on another record and propagated to the next level (from SalesOrder to Customer). The same rule is for workflows. :( One of the biggest gaps in NetSuite (from my point of view). As a database developer, I created a lot of solutions with triggers on INSERT/UPDATE/DELETE events on table records. That provides actions for such business processing, data consistency… When I realized that NetSuite would not execute User Events inside of a chain of updates, that became a nightmare for me. Yes, we can create a custom module and invoke the same function from multiple points (different user-events) but only if we are the ONLY ONE DEVELOPER … and then came a bundle from 3rd party … Good night