cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP C4C ABSL - How to get recently created ID of a Business Object?

Former Member
0 Likes
854

Hello.

Is it possible to get an ID of a created entry?

For example:

var accountNode : elementsof Customer; 
var newCustomer;

accountNode.CategoryCode = "1"; 
roleNode.RoleCode.content = "CRM000"; 
newCustomer = Customer.Create(accountNode);

I need to get ID field on a run-time but it is not yet known until record is saved. Any workarounds for this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Veliks,

ID will only be generated when an instance is saved in the database. If the code is in your custom action, you can try to call Save after BO action. And try to read the created instance in another action as by then entry will get generated.

Regards,

Abdul Rasheed