Description
Messages similar to function() failed with soap exception -1: "INVALID" and/or errormessage in stdlog like "dangling reference to persid" on trying to insert or update rows using webservices methods like CreateObject() or CreateRequest()
Solution
Within webservices methods when you try to insert rows into a table, and the corresponding object attributes are pointers (SREL) to other objects, you cannot use a fix value for these attributes, you'll have to use the handle as the value.
For example, the following pseudo-code illustrates how to create a new incident by passing the correct crt object handle to the createRequest method.
Setting the cr type attribute in the name-value pair that is passed as a parameter to createRequest, creates the new incident:
attrVals = {"summary", "A new incident", "description", "new incident", "type", "crt:182"}
You can check which attributes of an object are pointing to another object (SREL) with the bop_sinfo command.
Fe. for the "cr" object:
bop_sinfo -d cr