Does anyone know how to remove a Dunning Recipient...
# suitescript
m
Does anyone know how to remove a Dunning Recipient from a customer? The following code doesn't work: record.detach({                                 record: { type: detachType, id: detachId },                                 from: { type: fromType, id: fromId }                             }) . I get the following error: code=INVALID_RCRD_TYPE, details=The record type [RECMACHCUSTRECORD_3805_DUNNING_RECIPIENT_CUST] is invalid.,
b
the error looks valid
RECMACHCUSTRECORD_3805_DUNNING_RECIPIENT_CUST
is a sublist id, not a custom record type
m
ok. Thanks. I'll try clearing the sublist. The goal is to remove the contact under Dunning Recipient thru a script
b
there are 3 ways to remove a child record from a parent record
the first is record.detach, which mimics the remove button
the second is editing the child record and unsetting the field used for the parent/child relationship
the third is editing the parent record and removing the child record from the sublist
m
I found the sublist, but how do I de-couple it from the parent?
b
m
thanks!