I want use 'contactGroups.delete' by GAS

46 Views Asked by At

I want use 'contactGroups.delete' by GAS I don't understand why it's an error

People.ContactGroups.delete({ "resourceName" : "contactGroups/8d49618c890eb1" });

error

TypeError: People.ContactGroups.delete is not a function

reference

1

There are 1 best solutions below

1
Tanaike On BEST ANSWER

When I saw the autocomplete of the script editor, it seems that People.ContactGroups.remove(resourceName: string, optionalArgs: Object). Ref And, if your resourceName is the valid value, how about the following modification?

People.ContactGroups.remove("contactGroups/8d49618c890eb1");
  • As additional information, if you want to use deleteContacts, please use it like People.ContactGroups.remove("contactGroups/8d49618c890eb1", {deleteContacts: true});. Ref