Set an auto-generated field value when records are added (Auto-numbering for custom section)

Team,



We have an option to set the field value automatically in an incremental order when a record is created/added to the section.

 

Creatio Academy Article:

Here, is the link to Set up auto numbering for the [ Code ] field in the [ Products ] section

https://academy.creatio.com/docs/node/2311



For any Custom Section, Kindly follow the below guidelines while creating system setting:

Server-Side Implementation:

Let us consider the custom section object is "Transaction" and the system setting - Prefix for object name is "Usr" and the field called Transaction Number(UsrTransactionNumber) has to be auto-numbered.

 

For the Custom object, Replacing object is not required as you have control over your object, click on the object and check the "Before Record Added" checkbox.



The name of the System setting created for auto numbering should be as below,

1.UsrTransactionCodeMask (Prefix + Object name + "CodeMask")

2.UsrTransactionLastNumber (Prefix + Object name + "LastNumber")

 

-->In the Condition flow, use your Custom field name instead of code as below, 

string.IsNullOrEmpty(Entity.GetTypedColumnValue("UsrTransactionNumber"))

 

-->In the business process, script task use your custom field name instead of Code as below, 

Entity.SetColumnValue("UsrTransactionNumber", UserTask1.ResultCode);

 

-->Name the script task elements as ScriptTask1, ScriptTask2 & user task element  as UserTask1 as mentioned in the article.

 

a)Transaction Code Mask

b)Transaction Last Number

 

 

Best Regards,

Bhoobalan Palanivelu.

Like 0

Like

Share

2 comments

Hi 

This solution is not working for me in case of a custom section object. I have used the exact same steps as mentioned by you in this article and in the Creatio Academy. I tried this in Creatio 7.18v.

 

Thanks

The link to the documentation is dead. Here is the new link : https://academy.creatio.com/docs/node/2311

Show all comments