Insert multiple records from record producer using List Collector field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 07:36 PM
Hi All,
I have a requirement,
In Record Producer I have "List Collector" Field (name: related_claims ) and I need to insert multiple records based on number of selections in List Collector field for this I have written a script in record producer level kindly check below script
For example: If I choose two values in "related_claims" Field it should create two records in the table but It creates 3 records one record is creating from record producer and remaining two are creating from for loop and target field is not updating (i.e: u_related_claim after splitting list collector field I need to update this field but out of 2 inserted records only one is updating other one not updating ) to restrict 3rd record while submitting I have written like current.setAbortAction(true) after written this line it is working as expected the only concern is it should not skip auto generated number (i.e INC000XXX) ) but here I observed that it is skipping auto generated number Ex: last inserted record number is INC0000236 it created two records like INC0000238, INC0000239. so here it skipped INC0000237 to overcome this I tried few approaches but didn't work can anyone kindly assist me in this.
Thanks in advance
Script: