Class CompanyField

회사필드

지원 중단되었습니다. 대신 People API 고급 서비스를 사용하세요.

연락처의 회사 필드

메서드반환 유형간략한 설명
deleteCompanyField()void이 회사 필드를 삭제합니다.
getCompanyName()String회사 이름을 가져옵니다.
getJobTitle()String직책을 가져옵니다.
isPrimary()Boolean기본 회사인지 여부를 가져옵니다.
setAsPrimary()CompanyField이 회사를 기본 회사로 설정하고 이전에 기본 회사였던 회사는 설정 해제합니다.
setCompanyName(company)CompanyField회사 이름을 설정합니다.
setJobTitle(title)CompanyField직책을 설정합니다.

지원 중단된 메서드

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

이 회사 필드를 삭제합니다.

// Deletes the first company associated with contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const company = contacts[0].getCompanies()[0];
company.deleteCompanyField();

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

회사 이름을 가져옵니다.

// Logs company name for all companies associated with contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const companies = contacts[0].getCompanies();
for (const i in companies) {
  Logger.log(companies[i].getCompanyName());
}

리턴

String: 회사 이름

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

직책을 가져옵니다.

// Logs job title for all companies associated with contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const companies = contacts[0].getCompanies();
for (const i in companies) {
  Logger.log(companies[i].getJobTitle());
}

리턴

String: 직책

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

기본 회사인지 여부를 가져옵니다.

// Logs true or false depending on whether each company is the primary
// company for contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const companies = contacts[0].getCompanies();
for (const i in companies) {
  Logger.log(companies[i].isPrimary());
}

리턴

Boolean — 기본인지 여부

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

이 회사를 기본 회사로 설정하고 이전에 기본 회사였던 회사는 설정 해제합니다.

// Sets the first company associated with contact 'John Doe' as primary
const contacts = ContactsApp.getContactsByName('John Doe');
const company = contacts[0].getCompanies()[0];
company.setAsPrimary();

리턴

CompanyField: 체이닝에 유용한 회사 필드입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

회사 이름을 설정합니다.

// Sets the company name for the first company associated with contact 'John
// Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const company = contacts[0].getCompanies()[0];
company.setCompanyName('ACME Corp');

매개변수

이름유형설명
companyString회사의 새 이름

리턴

CompanyField: 체이닝에 유용한 회사 필드입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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

지원 중단되었습니다. 이 함수는 지원 중단되었으며 새 스크립트에서 사용해서는 안 됩니다.

직책을 설정합니다.

// Sets the job title for the first company associated with contact 'John Doe'
const contacts = ContactsApp.getContactsByName('John Doe');
const company = contacts[0].getCompanies()[0];
company.setJobTitle('Manager');

매개변수

이름유형설명
titleString이 회사 담당자의 새 직책

리턴

CompanyField: 체이닝에 유용한 회사 필드입니다.

승인

이 메서드를 사용하는 스크립트에는 다음 범위 중 하나 이상의 승인이 필요합니다.

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