Hi all

 

Somebody know where can I change or restart autonumbering, i need to define a process to eache year restart the numbers

 

I'm asking regarding the new Creatio feature to AutoNumber any entity (8.1)

 

Thanks in advance

Like 1

Like

3 comments

Hello, somebody can help me with this question please?

Hello,

 

Currently, no interface allows users to configure this manually, so the following steps need to be taken:



Identify the UId of the auto-numbered column.



For the identified column, use the script below to set a new starting number. In the examples provided, '4a40180c-61bf-de86-2f08-b05852a5ea6d' represents the UId of the auto-numbered column, and '1' is the next value from which the auto-numbering will proceed.



Script for MSSQL:

 

ALTER SEQUENCE [4a40180c-61bf-de86-2f08-b05852a5ea6d]
RESTART WITH 1;



Script for PostgreSQL:

SELECT setval('4a40180c-61bf-de86-2f08-b05852a5ea6d', 1, false);



If you need further information or assistance, please reply to this message and we will be happy to help you.

 

Thanks, I need to reset them yearly in a process, how can automatically fit it?

Show all comments

Hello,



We are working on adding a custom section in the mobile application. Everything is working fine but the AutoNumber field is not getting populated. I have seen in "Cases" that the auto numbering is working fine. Any help would be appreciated. Thanks

Like 0

Like

1 comments

Hello,



Currently, auto-numbering of fields in an object is a new functionality that the mobile app does not yet support. Support for this functionality will be available at the beginning of the new year.  



If you need auto-numbering on an object and want it to work everywhere, both on the web and in the mobile app, you need to implement the auto-numbering logic not through default values, but by implementing it in code on the object.

Show all comments

Hello, 

I'm using [Autonumber] field for managing record number data automatically like in the documentation   , Set up an [Autonumber] field | Creatio Academy 

Now, i need to reset the increment  to the 0  if the user clicks  on a button

How to reset the increment ? any idea !

Thank you 

Like 1

Like

1 comments

Hi,

There's no direct way to reset the auto number field. 

It's based on the Sequence object in the DB, you can run the script that will restart the sequence. For example, you could create a business process that will execute a script that will restart the sequence. 



Best regards,

Yuri

Show all comments

Hello,

I want to auto-number in a Custom module in Studio, the numbering I will do will be handled with different values and must be sequential. I need an answer on how to do it.

Like 0

Like

1 comments

Hello Burak,

 

Please find the instruction for Freedom UI by the link below:

https://academy.creatio.com/docs/user/nocode_platform/element_setup_exa…

And for classic UI (required development skills) by the link below:

https://academy.creatio.com/docs/developer/interface_elements/record_pa…

Show all comments

Hello Community,

How to write the auto-numbering of field using Stored procedure SQL

 

Thanks In Advance

 

Like 0

Like

5 comments

Hello,

 

Please note that autonumbering became available starting from Creatio version 8.0.5, you can find more info in this Creatio article and this:

 

It is now possible to number new records in Freedom UI automatically quicker and easier using the [ Autonumber ] field. You can set the number prefix and change the quantity of digits in the number. Creatio populates the field both when you add a record manually and when a business process or integration add it.

 

Mira Dmitruk,

Yes but i need this for the 8.0.0 version

Honey,

 

In such case this article should provide the needed instructions.

Mira Dmitruk,

Thanks but the requirement is with stored procedure 

Mira Dmitruk,

Hello, We have a cloud instance where we need to run auto increment based after insertion. Do we have any examples ?

Show all comments

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

hi all,

I'm doing the server side auto numbering shown in this link on a created package and a created section 

- my section is called returns 

- my field that i want to make auto number is Code 

"https://academy.creatio.com/documents/technic-sdk/7-15/how-add-auto-num…"

 

 followed all the steps shown in screenshots and doesn't work ? 

and here from the object file i opened the process and made this 

 with these configurations

Message:

conditional flow: 

conditional flow formula:

Get entity schema to generate number:

Generate number and error icon :

Save number to entity column:

 

any sol please 

thanks all 

Like 0

Like

6 comments

Hello Ibrahim,

What is the name of the column in your returns object where the number will be stored? In the article on the academy website, it's using a column named "Code", but your column name is likely different, possibly something with a prefix in front of it, like maybe UsrCode?

You'll need to update the column name in two places:

  1. The conditional flow formula (replace "Code" with your column name)
  2. Save number to entity column (replace "Code" with your column name)

Also, it would be a good idea to verify the names of the process elements. The academy article assumes they are named "UserTask1", etc.   Verify the following:

  1. The task titled "Generate ordinal number", verify it's name by clicking the three-dots icon on the top of it's properties, then select "Advanced mode" and there you'll find it's name in the "Code" field. You'll need to update the code in your screenshot titled "Get entity schema to generate number" with this name - replace "UserTask1" with this value, if different.
  2. Do the same with the "UserTask1" value in the code in your screenshot titled "Save number to entity column", if different.

Lastly, if it is still not working, please post the error you receive when you publish.

Ryan

Dear Ryan,

 

Thank you for your answer, it is very helpful. Additionally to doing everything from the message above you have to put the whole process In the "Event sub-process element".

 

Ryan Farley,

Thank you for your answer 

Max,

yeeees that's it 

thank you 

Hi Ibrahim,

 

Could you please help me with what I am missing with the same implementation? I have created the post on it https://community.creatio.com/questions/event-trigger-issue

 

Thank you

How to do Auto-numbering using SQL Script using Stored procedure

Show all comments

Hi all,

as this link 

"https://academy.creatio.com/documents/technic-sdk/7-15/how-add-auto-num…"

 

i need to make auto numbering in custom section called returns 

i need to make "CASE IMPLEMENTATION ALGORITHM: SERVER-SIDE"

 

i made the first point "1. CREATE TWO SYSTEM SETTINGS" and created the two system settings 

in the second point " CREATE A REPLACING SCHEMA OF THE [PRODUCT] OBJECT" when i create and choose the returns section as parent object it gives me an error like that :

 

how can i solve this ?

thanks 

 

Like 0

Like

12 comments

Dear Ibrahim,

 

Thank you for your question!

 

As per the Article provided: 

Select a custom package and execute the [Add] – [Replacing object] menu command on the [Schemas] tab. Specify the [Product] object as the parent object in the new object properties

 

Please check if you are creating a replacing object within the Custom Package 

 

Thank you!

Hope this helps,

Regards,

Danyil

Danyil Onoprienko,

 

yes within the custom package 

 

 

Ibrahim Nour Eldin,

 

Thank you for your answer!

 

Please make sure that you specify the [Product] object as Parent when creating a replacing object

 

Thank you!

Regards,

Danyil 

Danyil Onoprienko,

 

thanks for your reply

i guess you doesn't read my question but i will explain to you 

i need to make auto number on a custom section not on products and my custom section is called returns 

 

thanks

Ibrahim Nour Eldin,

 

The Article provided is a guide on how to add auto-numbering to the [Products] section.

 

Since you have already created a custom section named [Returns] that is based in the Custom package (all new custom objects are being created and stored in the Custom package) you receive the following error as there would be two similar objects referring one to each other.

 

You may continue to step 3 if you are using a custom section named [Returns]

 

Step 2 is considered for those objects that aren't located in the Custom package initially (for example, you have developed a new package and imported it in a new system having the [Returns] section in that package - for these purposes, you would need to create a "Replacing Object" in a Custom Package on a new instance to which this package has been installed)



Hope this clarifies!

Regards,

Danyil

Danyil Onoprienko,

 

when i skip 2 and go to advanced setting to enable event handler i found two files with the same name for the Returns section on in the Custom Package and one in the Package i created 

where should i enable the event handler ? 

thanks 

Ibrahim Nour Eldin,

 

Thank you for your question

 

You may read on how to use the Object Designer to configure entity schemas here: https://academy.creatio.com/documents/technic-sdk/7-15/workspace-object…

 

Hope this helps!

 

Thank you

Danyil

Danyil Onoprienko,

 

you don't understand me in my last question i asked about where i enable event in the section file in my package or in the section file in the custom package 

 

thanks

Ibrahim Nour Eldin,

 

Thank you for specifying!

 

The Event Handler should be enabled in the Custom Package

 

Regards,

Danyil

Danyil Onoprienko,

 

when i build the business process in formula when i write the code it gives me this error 

thanks

Danyil Onoprienko,

 

any sol please for this ?

 

thanks

Ibrahim Nour Eldin,

 

Please contact us at support@creatio.com in order for us to provide the best possible solution

 

Thank you!

Regards,

Danyil

Show all comments

Good day.

I am new to BPM Online(And C#). I just registered a 14 day free account to try it out.

I want to use the sub process to create a case number when a new record is created on a section. Please see the image below:

When the new record is saved the process starts and reads the zone filed from the request record as depicted below:

Upon reading the zone field I then assign the zone filed to the zone process variable using the formular task as depicted below:

I then use the zone process variable to formulate the case number in the code script as depicted below:

string unique_numer =  DateTime.Now.ToString("yyMMddhhmmss");
string  zone_val = Get<Guid>("zone").ToString();
string case_number=(zone_val+"-"+unique_numer)
 
Set("case_number",case_number);
return true;

The challenge I am facing is to get the value of the selected lookup zone field to store the value into zone_val string filed.

How to get the selected value from the zone lookup filed using C# code. The value that I get is a Guid data type and cannot get the value of the lookup.

I need to store the generated CaseNumber to the case_number field in the database as depicted below:

You help will be highly appreciated as I am currently stuck.

 

Like 0

Like

4 comments

Dear Tebogo,

You may create a system setting that will store this number and use it in the future number generation. You can find detailed example here: https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-auto-n…

Best regards,

Angela

Assuming you want the field name in the Zone Table : 

var uc = Get&lt;UserConnection&gt;("UserConnection");
 
Guid zoneId = Get&lt;Guid&gt;("zone");
 
var esq = new EntitySchemaQuery(uc.EntitySchemaManager.GetInstanceByName("Zone"));
esq.AddColumn("Name");
var entity = esq.GetEntity(uc, zoneId );
string zoneName = entity.GetTypedColumnValue&lt;string&gt;("Name");

 

Angela Reyes,

Thank you very much Angela.

Jerome BERGES,

Thank you very much Jerome, highly appreciate it!

Show all comments

I am trying to add an auto-numbering field on Opportunity.

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

I successfully did this with the Product object just like the guide said. It was very easy.

But when I try to do the same thing on Opportunity, there are some differences. Opportunity does not have the inherited Code –property or the methods called in the code under onEntityInitialized()

I have only tried the client-side solution.

Best regards,

Like 0

Like

6 comments

Hi, Julius!



As you have your own field in Opportunity (e.g. "UsrCode"), so you can use:



    onEntityInitialized: function() {

                 // onEntityInitialized method parent realization is called.

                this.callParent(arguments);

                // The code is generated only in case we create a new element or a copy of the existing element.

                if (this.isAddMode() || this.isCopyMode()) {

                    //  Call of the Terrasoft.BasePageV2.getIncrementCode base method, that generates the number 

                    // according to the previously set mask. 

                    this.getIncrementCode(function(response) {

                    // The generated number is stored in [Code] column.

                        this.set("UsrCode", response);

                    });

                }

            }

Dear Julius,

Since opportunity section does not have an existing Code column, you can create one using means of section wizard.

No special methods needed for new column, since we are calling parent realization in the onEntityinitialized method, which has the logic of working with auto incrementing. Just be sure to indicate your custom column in the this.set method by its name, but not title.

As for the back end realization of the auto incrementing, follow the instructions just the same, but indicate name of the custom column.

Regards,

Anastasia

 

Anastasia Botezat, Vladimir Sokolov,

I tried this again. But it's not working. No value gets set.

I have created the System Settings, the Property on Opportunity, And I have adjusted the JavaScript to have the correct string value, "UsrCode".

It's not working this time either. Is the on-client method unavaliable on the Opportunity object?

Maybe the Opportunity object does not know the Systems Settings i Created. The system settings code names are : OpportunityLastNumber and OpportunityCodeMask

UPDATE : It is working while using Copy. But no Code is set when adding an Opportunity with the Mini-Page. I am now working on this. Any advice appreciated.

UPDATE 2 : Creating and Copying works as long as I do not have a Mini-Page. I tried to add the same JavaScript in the MiniPage methods{}. But that's not working. Any tricks to use MiniPages?

Julius,

The auto increment logic is not a part of basic mini page logic. The 

getIncrementCode method is written on the BasePageV2. However, mini pages are inherited from BaseMiniPage, which does not have such method.

You can add the getIncrementCode method realization to the mini page, so that it will execute the logic. 

As for the back-end part, the changes are displayed on the client side only after record is saved. Therefore, it is impossible to view the code value on the opportunity page immediately. 

Regards,

Anastasia

Anastasia Botezat,

 I did not get this to work with Mini-Page. I have anyway decided to work without the mini-pages. When Creating a Opportunity I just get the regular edit page where the incremented numbers work fine. Thank you.

Anastasia Botezat,

Hi,

This dint worked  even to me. 

https://community.bpmonline.com/questions/auto-increment-issue

I have posted the issue in detail in the above link. Please help!!!!

regards,

Sriraksha

Show all comments