I'm doing a record.create of a custom record that ...
# suitescript
k
I'm doing a record.create of a custom record that has a user event which came from a bundle so I can't really modify the UE script. Is it possible to either pass context parameters to the UE's beforeLoad or create the record without triggering the UE?
e
CSV import allows you to create records without executing UEs and Workflows.
k
yeah, I'm looking for a scripted solution
m
you could initiate a csv import via a script
k
yeah except they want to do it on the fly, so you create a record of one custom record type, then create a related custom record of a different type, except the second record has a UE that prevents saving if it's not created "from" the first record, which doesn't seem doable via script, so if I do it via csv I'd have to have the first record create a CSV and then import it via script.
b
you can try taking advantage that user events don't trigger other user events
👍🏻 1
👍 1
have a user event on the first record that create the second forbidden record
k
I was talking with my boss today and that's the solution we came up with, too. I'll give it a try, thanks! 🙂