Class CustomField

कस्टमफ़ील्ड

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

संपर्क में मौजूद कस्टम फ़ील्ड.

तरीके

तरीकारिटर्न टाइपसंक्षिप्त विवरण
getLabel()Objectइस फ़ील्ड का लेबल दिखाता है.
setLabel(label)CustomFieldइस फ़ील्ड का लेबल सेट करता है.
तरीकारिटर्न टाइपसंक्षिप्त विवरण
deleteCustomField()voidइस फ़ील्ड को मिटाता है.
getValue()Objectफ़ील्ड की वैल्यू दिखाता है.
setLabel(field)CustomFieldइस फ़ील्ड का लेबल सेट करता है.
setValue(value)CustomFieldइस फ़ील्ड की वैल्यू सेट करता है.

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

getLabel()

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

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

वापसी का टिकट

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.
const contacts = ContactsApp.getContactsByName('John Doe');
const addressFields = contacts[0].getAddresses();
addressFields[0].setLabel('Apartment');

पैरामीटर

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

वापसी का टिकट

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

अनुमति देना

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

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

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

अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.

इस फ़ील्ड को मिटाता है.

const contacts = ContactsApp.getContactsByName('John Doe');
const fields = contacts[0].getCustomFields();
for (let i = 0; i < fields.length; i++) {
  if (fields[i].getLabel() === 'foo') {
    fields[i].deleteCustomField();
  }
}

अनुमति देना

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

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

अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.

फ़ील्ड की वैल्यू दिखाता है.

// Logs the value of all the custom fields for contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const fields = contacts[0].getCustomFields();
for (const i in fields) {
  Logger.log(fields[i].getValue());
}

वापसी का टिकट

Object — फ़ील्ड में सेव की गई वैल्यू

अनुमति देना

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

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

अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.

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

// Sets the first custom field associated with contact 'John Doe' to use 'Mail
// application' as a label, with 'Gmail' as the value.
const contacts = ContactsApp.getContactsByName('John Doe');
const field = contacts[0].getCustomFields()[0];
field.setLabel('Mail application');
field.setValue('Gmail');

पैरामीटर

नामटाइपब्यौरा
fieldExtendedFieldनया स्टैंडर्ड लेबल

वापसी का टिकट

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

अनुमति देना

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

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

अब काम नहीं करता. इस फ़ंक्शन का इस्तेमाल बंद कर दिया गया है. इसलिए, नई स्क्रिप्ट में इसका इस्तेमाल नहीं किया जाना चाहिए.

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

// Sets the first custom field associated with contact 'John Doe' to use 'Mail
// application' as a label, with 'Gmail' as the value.
const contacts = ContactsApp.getContactsByName('John Doe');
const field = contacts[0].getCustomFields()[0];
field.setLabel('Mail application');
field.setValue('Gmail');

पैरामीटर

नामटाइपब्यौरा
valueObjectनई वैल्यू

वापसी का टिकट

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

अनुमति देना

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

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