Class CustomField

CustomField

अब काम नहीं करता. इसके बजाय, People API की बेहतर सेवा का इस्तेमाल करें

संपर्क में पसंद के मुताबिक बनाया गया फ़ील्ड.

तरीके

तरीकारिटर्न टाइपसंक्षिप्त विवरण
getLabel()Objectइस फ़ील्ड के लिए लेबल की जानकारी मिलती है.
setLabel(label)CustomFieldइस फ़ील्ड का लेबल सेट करता है.

ज़्यादा जानकारी के साथ दस्तावेज़

getLabel()

इस फ़ील्ड के लिए लेबल की जानकारी मिलती है. यह कोई फ़ील्ड, ExtendedField या स्ट्रिंग हो सकती है.

// 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());
}

रिटर्न

Object — इस फ़ील्ड का लेबल

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:

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

setLabel(label)

इस फ़ील्ड का लेबल सेट करता है.

// 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');

पैरामीटर

नामTypeब्यौरा
labelStringइस फ़ील्ड के लिए नया लेबल

रिटर्न

CustomField — यह फ़ील्ड, चेन करने के लिए काम का है

अनुमति देना

इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या ज़्यादा स्कोप से अनुमति देने की ज़रूरत होती है:

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

काम न करने वाले तरीके