I think I’ve got a different version of the problem discussed in https://www.epiusers.help/t/updating-or-adding-new-custcnt-with-custcnattr/99868 but haven’t been able to find a solution.
This is a screen shot of the kinetic function that I’m calling from a data directive BPM.
The purpose of this function is to send new contacts and contact updates to Salesforce and if it was a new contact then the SalesforceID is written back to CustCnt.SalesforceID_c.
In the Get CustCnt step, I am using the Erp.CustCnt GetByID method to retrieve the CustCnt record I want to update. That record is retrieved into a CustCnt tableset called dsCustCnt.
If this was a new contact sent to Salesforce, then an Update Table by Query widget (Update dsCustCnt) sets the RowMod field to “U”, and the SalesforceID_c field to a variable value returned from the Call Rest API step. I’ve tried the following bindings of AttrCodeList field -
-ignore
-field: dsCustCnt_CustCnt_AttrCodeList
-expr:“”
Regardless of what I do with the AttrCodeList field, when I call use the Invoke BO Method widget to call the Erp.CustCnt.Update BO method I get the Pkey violation error.
To make sure I wasn’t getting a misleading error, I have deleted the record in CustCnAttr for the contact I am testing with. The Update method runs without error then and a new record is created in CustCnAttr for the contact.
I’m out of ideas.