Obsolète. Utilisez plutôt le service avancé de l'API People.
Champ personnalisé dans un contact.
Méthodes
Méthode | Type renvoyé | Brève description |
---|---|---|
getLabel() | Object | Récupère le libellé de ce champ. |
setLabel(label) |
| Définit le libellé de ce champ. |
Documentation détaillée
getLabel()
Récupère le libellé de ce champ. Il peut s'agir d'un champ, d'un champ ExtendedField ou d'une chaîne.
// 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. var contacts = ContactsApp.getContactsByName('John Doe'); var addressFields = contacts[0].getAddresses(); for (var i = 0; i < addressFields.length; i++) { Logger.log(addressFields[i].getLabel()); }
Renvois
Object
: libellé de ce champ
Autorisation
Les scripts qui utilisent cette méthode nécessitent une autorisation associée à un ou plusieurs des champs d'application suivants:
-
https://www.google.com/m8/feeds
setLabel(label)
Définit le libellé de ce champ.
// 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. var contacts = ContactsApp.getContactsByName('John Doe'); var addressFields = contacts[0].getAddresses(); addressFields[0].setLabel('Apartment');
Paramètres
Nom | Type | Description |
---|---|---|
label | String | le nouveau libellé de ce champ |
Renvois
: champ utile pour les chaînesCustomField
Autorisation
Les scripts qui utilisent cette méthode nécessitent une autorisation associée à un ou plusieurs des champs d'application suivants:
-
https://www.google.com/m8/feeds