RE: Are NetSuite record ids guaranteed to be positive integers?

Hi,

I wonder if I can assume throughout my code that NetSuite record ids are numerical, or specifically positive integers (either in string or number form). Can I?

I’m passing the record id via a URL param to my Suitelet and would like to validate it before using, as an input that a (potentially malicious) user has control over.

Thanks!

 

jzankowski Rookie Asked on July 11, 2024 in SuiteScript.
Add Comment
1 Answers
Best answer

Hi,

Generally speaking, yes. You may find some negatives for standard records, e.g. the user who creates the account has an ID of -5, the administrator role has an ID of -3, etc.

If you’re talking transactions then they will always be positive.

Thanks,

Chris

Advanced Answered on July 15, 2024.

Thanks!

on July 22, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.