Class CustomField

CustomField

Không dùng nữa. Thay vào đó, hãy sử dụng dịch vụ nâng cao về API Mọi người

Trường tuỳ chỉnh trong một mục Liên hệ.

Phương thức

Phương thứcKiểu dữ liệu trả vềMô tả ngắn
getLabel()ObjectLấy nhãn cho trường này.
setLabel(label)CustomFieldĐặt nhãn cho trường này.

Tài liệu chi tiết

getLabel()

Lấy nhãn cho trường này. Đây có thể là một Trường, ExtendedField hoặc một Chuỗi.

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

Cầu thủ trả bóng

Object – nhãn của trường này

Ủy quyền

Tập lệnh sử dụng phương thức này cần được uỷ quyền với một hoặc nhiều phạm vi sau:

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

setLabel(label)

Đặt nhãn cho trường này.

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

Các tham số

TênLoạiNội dung mô tả
labelStringnhãn mới cho trường này

Cầu thủ trả bóng

CustomField — trường này, hữu ích cho việc tạo chuỗi

Ủy quyền

Tập lệnh sử dụng phương thức này cần được uỷ quyền với một hoặc nhiều phạm vi sau:

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

Các phương thức ngừng hoạt động