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

I want to write code for "Auto Increment Numbering" when any entry will be added from anywhere in instance like Add page or business process or Data import utility.



Please suggest me the solution.

Like 0

Like

4 comments

Dear Jitendra, 

 

Please check server-side implementation in the article below:

https://academy.creatio.com/documents/technic-sdk/7-15/how-add-auto-numbering-edit-page-field

Dennis Hudson,

Thanks for the reply.

But I am facing an issue while creating the business process.

Insite the formula boxstring.IsNullOrEmpty(Entity.GetTypedColumnValue<string>("Code"))

is not accepted.

Throwing error " 

Formula value error: Parameter "Entity" not found

 

 

Thanks for the reply.

But I am facing an issue while creating the business process.

Insite the formula boxstring.IsNullOrEmpty(Entity.GetTypedColumnValue<string>("Code"))

is not accepted.

Throwing error " 

Formula value error: Parameter "Entity" not found

jitendra,

Most likely you are creating a regular process, you need to create a process in an object (http://prntscr.com/r78hmo)

Show all comments