Can we customize the the id attribute of an Entity

Hi All,

I am using an entity UseCase where the requirement is whenever user creates a record the id attribute should be automatically set to UseCase-1 , UseCase-2 like this.

I have tried to change the attribute type to text but that will disable the auto numbering facility. Is there any way to set up like that i.e. both auto number and have the id like that.

Basically requirement is user will click on Usecase-1 to get it's details in detail page.

Hi,

No it is not possible. Why don't you still save on the database just the number and when you are showing it just add the text you want. "UseCase-" +  UseCase.Id?

This option is not enough for you?

Regards,

Marcelo

You have two options:

1. Use the Auto number as Integer and show  "UseCase-" +  UseCase.Id using a Expression;

2. Create the attribute as text and Create a logic to wrap the CreateOrUpdate function and then get the last ID from the Entity removing the text part and Add +1 when creating the record.

For performance issues It is always recommended to save the Identifier as number, as the first option.


Suprio Roy wrote:

Hi All,

I am using an entity UseCase where the requirement is whenever user creates a record the id attribute should be automatically set to UseCase-1 , UseCase-2 like this.

I have tried to change the attribute type to text but that will disable the auto numbering facility. Is there any way to set up like that i.e. both auto number and have the id like that.

Basically requirement is user will click on Usecase-1 to get it's details in detail page.