Class CustomField

Niestandardowepole

Wycofany. Zamiast tego użyj zaawansowanego interfejsu People API.

Pole niestandardowe w kontakcie.

Metody

MetodaZwracany typKrótki opis
getLabel()ObjectPobiera etykietę tego pola.
setLabel(label)CustomFieldUstawia etykietę tego pola.

Szczegółowa dokumentacja

getLabel()

Pobiera etykietę tego pola. Może to być pole, rozszerzone pole lub ciąg znaków.

// Logs the label for all the address fields associated with contact
// 'John Doe'. This method can be similarly called for any field that has
// a label.
const contacts = ContactsApp.getContactsByName('John Doe');
const addressFields = contacts[0].getAddresses();
for (let i = 0; i < addressFields.length; i++) {
  Logger.log(addressFields[i].getLabel());
}

Powrót

Object – etykieta tego pola

Autoryzacja

Skrypty, które korzystają z tej metody, wymagają autoryzacji z co najmniej jednym z tych zakresów:

  • https://www.google.com/m8/feeds

setLabel(label)

Ustawia etykietę tego pola.

// Sets the label to 'Apartment' for the first address field associated
// with contact 'John Doe'. This method can be similarly called for any
// field that has a label.
const contacts = ContactsApp.getContactsByName('John Doe');
const addressFields = contacts[0].getAddresses();
addressFields[0].setLabel('Apartment');

Parametry

NazwaTypOpis
labelStringnowa etykieta tego pola.

Powrót

CustomField – to pole, przydatne do łańcuchowania

Autoryzacja

Skrypty, które korzystają z tej metody, wymagają autoryzacji z co najmniej jednym z tych zakresów:

  • https://www.google.com/m8/feeds

Wycofane metody