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

Parallel processing in c4c

0 Likes
1,271

Hi Everyone,

We have a custom business object in which we are using auto generation of ID(which is an external key). It is working fine if we are doing it manually. Even it is working fine if we load up to 50 records through Data Workbench. But when we are loading greater than 50 records, ID is getting locked and we are getting an error "Cannot lock alt. key ID with value 123; instance is locked by user x".

So we raised an incident with SAP and they told that our custom code must support parallel processing as the template will be split into payloads of 50 records each and those payloads will be sent in parallel for processing. As number of payloads are sent in parallel, the object is getting locked.

Please guide me how to make my script support parallel processing such that the object won't get locked while uploading data through Data Workbench. Below is the script I'm using for auto generation of ID:

if(this.GetFirst().ID.IsInitial()){

var InstanceCount = CustomBO.QueryByElements.Execute().Count();

if(InstanceCount==0){

this.GetFirst().ID = 1;

}else{

this.GetFirst().ID = count + 1;

}

Thanks,

Suneel

Accepted Solutions (0)

Answers (0)