getService method due to a deprecation in the Contacts API. Here's the improved version to capture the "Organization 1 - Service" field:ContactsApp service no longer supports getService. We've replaced it with the PeopleAPI.PeopleService to access contact details using the resource ID obtained from the organizations object.PeopleAPI call, we access the department property within the first organization (person.organizations[0].department) to retrieve the "Organization 1 - Service" information.Note:
https://www.googleapis.com/auth/contacts.readonly).With these changes, your script should successfully retrieve the "Organization 1 - Service" field along with other contact information.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/8f142885-4899-4d3b-adad-37c040c97f96n%40googlegroups.com.