so I've got the following attach code ```Nrecord.a...
# suitescript
r
so I've got the following attach code
Copy code
Nrecord.attach({
    "record":{
        "type":"contact",
        "id":32602
    },
    "to":{
        "type":"customer",
        "id":32603
    },
    "attributes":{
        "role":-10
    }
});
it is attaching the contact to the customer, but the role is blank on the customer record. No errors are being reported. I've double checked that
-10
is the IID for
Primary Contact
, but can't figure out why it's not attaching with the correct role
b
you can only have 1 primary contact
r
I understand that. The customer record in question does not have a primary contact. I tried setting the CONTACT.company field, to the CUSTOMER, and while that attaches it automatically, it still does not set the role to
Primary Contact
b
thats pretty much it, you have the contact customer and the correct attribute
and the code works in my account
r
I thought it was right, but for some reason role isn't being set. Was making sure I wasn't missing something stupid.