- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 08:23 AM
I have a custom field that has auto-numbering set up. However the prefix for that field needs to change depending on a "Type" field value.
I don't want to set the default value, because the number field should be blank until the Type field value is set. If the Type field value changes later on, the number field should also adjust the prefix.
Does anyone have any suggestions on how to do this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:15 AM
Update your code like below
current.u_risk_identifier = getNextObjNumberPadded();
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 08:33 AM
You can configure a business rule on your custom table and based on type fielf value, you can use below API to do auto numbering.
var a = return new global.NumberManager().getNextObjNumberPadded();
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:06 AM
Is the return statement necessary? My business rule script is giving me an unexpected return statement error. I tried this instead but I'm getting a blank value:
current.u_risk_identifier = new NumberManager().getNextObjNumberPadded();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:15 AM
Update your code like below
current.u_risk_identifier = getNextObjNumberPadded();
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2022 09:19 AM
Perfect this works! Thank you