<@U7A0KGURX> Thing I'm wary of is that the custom ...
# suitescript
n
@alien4u Thing I'm wary of is that the custom record could be updated by a UE but also directly or through uploads etc. Sounds like I may need to create a SuiteLet for the case where the record is updated from a UE trigger and a UE on the custom record for other circumstances
m
Your suitelet could be as simple as
record.load(params).save();
to trigger any UEs on the custom record.
That way your logic stays in the UE where it belongs.
r
When you say uploads are you referring to CSV imports? There is an option in CSV imports that allows you to trigger User Event scripts in the record.
n
@mattdahse User even triggered on create / edit of estimate As part of this it creates / updates a custom record. Further to this, new requirements expect that on create or change of certain fields on the custom record various further code needs to run. The problem, as I see it, is I need to be able to ascertain the old rec / new rec to establish changes have happened to the custom record if it's updated. Potentially a user could open the custom record and edit / save it or even directly create a record. Further to this, if the custom record has a flag on it and on create / edit this is set and a scheduled script runs to update certain fields too and some of those fields are fields I'm interested in if they have changed. It's a bit of a minefield and I'm battling in my head the cleanest approach without stepping on the toes of the various scripts running.
r
If you dont want the user to be able to edit or create a custom record, you could lock the record with a workflow