Does anyone know if it's possible to trigger a scr...
# suitescript
b
Does anyone know if it's possible to trigger a script when a contact is removed from a customer (in Relationships > Contacts)? So far nothing I've tried has worked, but I thought I'd check before coming up with some complicated workaround. Thanks!
a
I'd assume there's an edit on the contact record? Since you're setting the company field on the contact record to null?
maybe an XEDIT rather than an EDIT?
"so far nothing I've tried has worked" what have you tried?
thanks 1
b
• I've tried a client script with both the validateDelete and sublistChange entry points, and a beforeSubmit user event script. • That's a good suggestion about the contact record, though I don't think the company field is the source for customer/contact relationships - company can be null, with the relationship still showing in the sublist. • I believe what's happening is that clicking attach/remove creates/deletes a join between the two records, but NetSuite doesn't provide access to the join table.
a
I'm surprised the sublistChanged entry point doesn't work šŸ˜• yeah idk about the company field specifically, just a thought, SOMETHING on either the customer or the contact must be changing, right? šŸ˜„
šŸ˜… 1