customerid And customeridtype

Use the customerid field to set the ID of the account or contact to which an object is related.

You can associate the following objects with either an account or a contact, but not both.

When setting the customerid field, set the customeridtype to indicate the type of ID that has been supplied in customerid. Use either:

Set the Dynamics 365 primary ID, which is a GUID, for either a customer or a contact, and set the customeridtype to value of 1 for account, or a value of 2 for contact.

Object Field
contact customerid, parentcustomerid, billingcustomerid
contactdetail customerid
customeropportunityrole customerid
customerrelationship customerid
customerrelationship partnerid
incident customerid
invoice customerid
lead customerid
opportunity customerid
quote customerid
salesorder customerid

To set customerid and customeridtype:

See also

Reference