Class CompanyField
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অপ্রচলিত পদ্ধতি
delete Company Field()
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
এই কোম্পানির ক্ষেত্র মুছে দেয়।
// 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
get Company Name()
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
কোম্পানির নাম পায়।
// 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
get Job Title()
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
চাকরির শিরোনাম পায়।
// 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
is Primary()
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
এটি প্রাথমিক কোম্পানি কিনা তা পায়।
// 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
set As Primary()
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
এই কোম্পানীটিকে প্রাথমিক কোম্পানী হিসাবে সেট করে এবং যে কোম্পানীটি পূর্বে প্রাথমিক ছিল তা আনসেট করে।
// 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();
প্রত্যাবর্তন
Company Field
— এই কোম্পানির ক্ষেত্র, চেইন করার জন্য দরকারী
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.google.com/m8/feeds
set Company Name(company)
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
কোম্পানির নাম সেট করে।
// 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');
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
company | String | কোম্পানির নতুন নাম |
প্রত্যাবর্তন
Company Field
— এই কোম্পানির ক্ষেত্র, চেইন করার জন্য দরকারী
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.google.com/m8/feeds
set Job Title(title)
অবচয়। এই ফাংশনটি বাতিল করা হয়েছে এবং নতুন স্ক্রিপ্টগুলিতে ব্যবহার করা উচিত নয়৷
কাজের শিরোনাম সেট করে।
// 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');
পরামিতি
নাম | টাইপ | বর্ণনা |
---|
title | String | এই কোম্পানিতে যোগাযোগের জন্য নতুন কাজের শিরোনাম |
প্রত্যাবর্তন
Company Field
— এই কোম্পানির ক্ষেত্র, চেইন করার জন্য দরকারী
অনুমোদন
যে স্ক্রিপ্টগুলি এই পদ্ধতিটি ব্যবহার করে তাদের নিম্নলিখিত এক বা একাধিক সুযোগের সাথে অনুমোদনের প্রয়োজন হয়:
-
https://www.google.com/m8/feeds
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-25 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe \u003ccode\u003eCompanyField\u003c/code\u003e object, representing a company field in a contact, is deprecated and should not be used in new scripts.\u003c/p\u003e\n"],["\u003cp\u003eInstead of using \u003ccode\u003eCompanyField\u003c/code\u003e, use the People API advanced service for managing contact information.\u003c/p\u003e\n"],["\u003cp\u003eAll methods associated with \u003ccode\u003eCompanyField\u003c/code\u003e, such as \u003ccode\u003edeleteCompanyField()\u003c/code\u003e, \u003ccode\u003egetCompanyName()\u003c/code\u003e, \u003ccode\u003egetJobTitle()\u003c/code\u003e, \u003ccode\u003eisPrimary()\u003c/code\u003e, \u003ccode\u003esetAsPrimary()\u003c/code\u003e, \u003ccode\u003esetCompanyName()\u003c/code\u003e, and \u003ccode\u003esetJobTitle()\u003c/code\u003e, are deprecated.\u003c/p\u003e\n"],["\u003cp\u003eScripts using these deprecated methods required authorization with the \u003ccode\u003ehttps://www.google.com/m8/feeds\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["The `CompanyField` in Contacts is deprecated; the People API should be used instead. It allowed managing company details for contacts, including deleting the company field, getting the company name and job title, and determining if a company was set as primary. You could also set a company as primary, modify the company name, and change the job title associated with a specific company. All these functions are deprecated, requiring authorization with the `https://www.google.com/m8/feeds` scope.\n"],null,["# Class CompanyField\n\nCompanyField\n\n\n**Deprecated.** Instead, use the [People API advanced\nservice](/apps-script/advanced/people)\n\nCompany field in a Contact. \n\n### Deprecated methods\n\n| Method | Return type | Brief description |\n|----------------------------------------------------|-------------------|-----------------------------------------------------------------------------------------------|\n| [deleteCompanyField()](#deleteCompanyField()) | `void` | Deletes this company field. |\n| [getCompanyName()](#getCompanyName()) | `String` | Gets the company name. |\n| [getJobTitle()](#getJobTitle()) | `String` | Gets the job title. |\n| [isPrimary()](#isPrimary()) | `Boolean` | Gets whether this is the primary company. |\n| [setAsPrimary()](#setAsPrimary()) | [CompanyField](#) | Sets this company as the primary company, and unsets whatever company was previously primary. |\n| [setCompanyName(company)](#setCompanyName(String)) | [CompanyField](#) | Sets the company name. |\n| [setJobTitle(title)](#setJobTitle(String)) | [CompanyField](#) | Sets the job title. |\n\nDeprecated methods\n------------------\n\n### `delete``Company``Field()`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nDeletes this company field.\n\n```javascript\n// Deletes the first company associated with contact 'John Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst company = contacts[0].getCompanies()[0];\ncompany.deleteCompanyField();\n```\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `get``Company``Name()`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nGets the company name.\n\n```javascript\n// Logs company name for all companies associated with contact 'John Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst companies = contacts[0].getCompanies();\nfor (const i in companies) {\n Logger.log(companies[i].getCompanyName());\n}\n```\n\n#### Return\n\n\n`String` --- the name of the company\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `get``Job``Title()`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nGets the job title.\n\n```javascript\n// Logs job title for all companies associated with contact 'John Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst companies = contacts[0].getCompanies();\nfor (const i in companies) {\n Logger.log(companies[i].getJobTitle());\n}\n```\n\n#### Return\n\n\n`String` --- the job title\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `is``Primary()`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nGets whether this is the primary company.\n\n```javascript\n// Logs true or false depending on whether each company is the primary\n// company for contact 'John Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst companies = contacts[0].getCompanies();\nfor (const i in companies) {\n Logger.log(companies[i].isPrimary());\n}\n```\n\n#### Return\n\n\n`Boolean` --- whether this is primary\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `set``As``Primary()`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nSets this company as the primary company, and unsets whatever company was previously primary.\n\n```javascript\n// Sets the first company associated with contact 'John Doe' as primary\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst company = contacts[0].getCompanies()[0];\ncompany.setAsPrimary();\n```\n\n#### Return\n\n\n[CompanyField](#) --- this company field, useful for chaining\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `set``Company``Name(company)`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nSets the company name.\n\n```javascript\n// Sets the company name for the first company associated with contact 'John\n// Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst company = contacts[0].getCompanies()[0];\ncompany.setCompanyName('ACME Corp');\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------|----------|------------------------------|\n| `company` | `String` | the new name for the company |\n\n#### Return\n\n\n[CompanyField](#) --- this company field, useful for chaining\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`\n\n*** ** * ** ***\n\n### `set``Job``Title(title)`\n\n\n**Deprecated.** This function is deprecated and should not be used in new scripts.\n\nSets the job title.\n\n```javascript\n// Sets the job title for the first company associated with contact 'John Doe'\nconst contacts = ContactsApp.getContactsByName('John Doe');\nconst company = contacts[0].getCompanies()[0];\ncompany.setJobTitle('Manager');\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|----------|---------------------------------------------------|\n| `title` | `String` | the new job title for the contact at this company |\n\n#### Return\n\n\n[CompanyField](#) --- this company field, useful for chaining\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.google.com/m8/feeds`"]]