Unable to insert in record via Pcode within nested Loop
Hi,
I am trying to write PeopleCode within a application Package which is used as an handler for a restful API.
I tried to used &record.Insert() to insert data into the table once read from the created document but it fails.
This is the document structure:
This is the record that I am tying to insert into as shown above - ZZ_AR_CRE_TBL .
As you can see it's a child record for another collection.
The rec.Insert() works fine for adding 1 row.
But when I loop into the collection and try to read and insert more than 1 row it fails.