is it possible to set the external id on a before ...
# suitescript
s
is it possible to set the external id on a before submit ?
c
yes
s
assuming the data is coming from the user
c
I don't know what that means. you just use setvalue on the newrecord, as with any other value. How you get it doesn't really matter. Obviously it's not on the form, so you'd have to get the actual value another way
s
till now it has not been working
b
You cannot
c
Actually, I am wrong. SauiteAnswer 79658 says it's not possible. I have only set it using SuiteTalk and CSV
Always happy to be wrong 🙂
s
here is an issue we would like that if the script has an error to not create the record or delete the record
b
throw an error before submit to prevent the record from being created
you can try deleting the record after submit, but dont expect any suiteapp's after submit scripts to work in your account
s
How can I throw an erro before submit if the error is from a failed after submit script
b
you cant
s
I know iwas responding to your idea
b
if you are trying to prevent duplicates, you will probably have to implement the logic yourself
If you want that solution to work with concurrency, you will probably have to use one of the methods documented in the _SAFE guide_