지원 중단되었습니다. 대신 People API 고급 서비스를 사용하세요.
연락처의 맞춤 입력란
메서드
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
get | Object | 이 필드의 라벨을 가져옵니다. |
set |
| 이 필드의 라벨을 설정합니다. |
지원 중단된 메서드
메서드 | 반환 유형 | 간략한 설명 |
---|---|---|
| void | 이 필드를 삭제합니다. |
| Object | 필드 값을 가져옵니다. |
|
| 이 필드의 라벨을 설정합니다. |
|
| 이 필드의 값을 설정합니다. |
자세한 문서
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. 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');
매개변수
이름 | 유형 | 설명 |
---|---|---|
label | String | 이 필드의 새 라벨 |
리턴
: 연결에 유용한 필드Custom
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
지원 중단된 메서드
deleteCustomField()
deleteCustomField()
지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.
이 필드를 삭제합니다.
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
getValue()
getValue()
지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.
필드 값을 가져옵니다.
// 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
setLabel(field)
setLabel(field)
지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.
이 필드의 라벨을 설정합니다.
// 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');
매개변수
이름 | 유형 | 설명 |
---|---|---|
field |
| 새 표준 라벨 |
리턴
: 연결에 유용한 필드Custom
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds
setValue(value)
setValue(value)
지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.
이 필드의 값을 설정합니다.
// 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');
매개변수
이름 | 유형 | 설명 |
---|---|---|
value | Object | 새 값 |
리턴
: 연결에 유용한 필드Custom
승인
이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.
-
https://www.google.com/m8/feeds