I have contact recordtype and experience record type with 1 contact to multiple experiences, linked through contact.id = experience.contactId. I have a form which saves contact details and a editable grid to capture multiple experiences. When I save I run a process model to first write to the contact DB and then I am writing in experience data entity.
In the wirte to DSE for experience, I have mapped the input of data note in second process with contact.id generated automatically from DB in contact table.This works fine with 1 experience entry, but if I add 2 entries then the process error out as for 2nd experience entry the contatId is null and due to which unable to write the data in experience table.
Can someone help?
Discussion posts and replies are publicly visible
Hi,
Add a script task before write to experience DB. In this new script out put do the following logic and save back to pv!experience.contactId
repeat( /*You need to map your experience process variable here*/ length(pv!experience), pv!contact.id )
It will save contact id to all experiences
Great, it worked perfectly. Thanks