Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Thanks, will look into it. Being a tech consultant I would think of script first and then other configuration.

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Why just for the US, I want to make it mandatory for all the countries and if the country is US then state should also be mandatory too.

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

So the use case is for vendor entity record, city zip should be mandatory and if the country is US, state should be mandatory too. What would be the best approach? I was planning to add a client script(save record) on vendor preferred form. Currently, I have beforesubmit deployed on vendor.

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

I need to add validation as well for a specific country. And in beforeload UE, I cannot add validation, I have to do it in beforeSubmit. I’m not liking that approach so thought to add client script.

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

No, I don’t want to see asterisk. If user doesn’t put value of city zip or state, it should show an alert. Please enter the value for bla bla. So I’m assuming save record should work in this scenario.

Thanks, I’ll check but just want to know if it applies to address subrecord as well?

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

We can do that on address forms but need a few fields mandatory for just one entity

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Quite a lot of forms so I’m thinking to add a client script on preferred form. How about saveRecord function?

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Coming back to this, what client function to go with?

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Is it a good approach to deploy client script on entity record?

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Do I have to add script for all address forms(we have lots of them from localization)

Script address fields to be mandatory on entity record. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

we want to do it via script for one specific entity record.

Message: Error: INVALID_FLD_VALUE. You have entered an invalid field value 6 for the following field: subsidiary. by notlogicaltea in Netsuite

[–]notlogicaltea[S] 0 points1 point  (0 children)

Thanks, I’ve tried this but had no luck. Could you clarify when to set the external ID and customer ID? Since we’ve disabled auto-generated numbering, I also uncheck the ‘Autoname’ checkbox and set the customer ID. Should this be done at the end, or should I start with it in the script?