Update Contact’s Role via SuiteScript
Hi folkz,
How do we update the the contact’s role via SuiteScript? I tried the one below and its just throwing unexpected error.
record.attach({
record: {
type: record.Type.CONTACT,
id:9309
},
to: {
type: record.Type.CUSTOMER,
id:9275
},
attributes: {
role:3
}
});
its working now
require([‘N’], N => {
N.record.attach({
record: {
type: N.record.Type.CONTACT,
id: 3226
},
to: {
type: N.record.Type.CUSTOMER,
id: 3225
},
attributes: {
role: -10
}
});
})
You saved me so much time. Thank you!!