How to add new value to datatype identifier

How to add new value to datatype identifier

  
I am trying to add 1 to Id entity attribute of CAR table
GetCARIdNumber.List.Current.CARMaster.Id + 1

in above step It throwing the error
Incompatible data type  in + operator


Please help me out

Thanks,
Poonam
Hi Poonam,  

This error is because you are trying to do an operation with a Identifier and a numeric value. You have do to something like this:
GetCARIdNumber.List.Current.CARMaster.Id + IntegerToIdentityRefInteger(1)

Regards,
Rui Branco
Hi Poonam,

Use: EntityRefIntegerToInteger(GetCARIdNumber.List.Current.CARMaster.Id) + 1
And if you need to assign it back to the record: IntegerToEntityRefInteger(EntityRefIntegerToInteger(GetCARIdNumber.List.Current.CARMaster.Id) + 1)

Rui: your solution also causes the same error. Since it complains it cannot use the + operator between 'CarMaster Identifier' and 'Entity Reference (Integer)'

Regards,
João Rosado
You're right, João

Your solution is the correct way to solve the problem. With the rush of wanting to help, i just give solution with the same problem. :)

Sorry for that.

Regards,
Rui Branco