মৃত্যুদন্ডের তথ্য
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
চলমান স্ক্রিপ্ট সম্পর্কে তথ্য
আপনি ExecutionInfo
অবজেক্টের পদ্ধতির মাধ্যমে চলমান স্ক্রিপ্টের নির্দিষ্ট বৈশিষ্ট্যগুলি অ্যাক্সেস করতে পারেন। উদাহরণস্বরূপ, isPreview()
আপনাকে বলে যে একটি স্ক্রিপ্ট বর্তমানে প্রিভিউ করা হচ্ছে বা বাস্তবে কার্যকর হচ্ছে কিনা।
এটি প্রায়ই ডিবাগিং কোড সহজ করে:
// Code that generates a report.
// ...
if (!AdsApp.getExecutionInfo().isPreview()) {
// Do not email the report when in preview mode!
MailApp.sendEmail("customer@example.com", "Report is ready!", report);
}
একটি স্ক্রিপ্ট এর অ্যাকাউন্ট সম্পর্কে তথ্য
একটি চলমান স্ক্রিপ্টের জন্য অ্যাকাউন্ট তথ্য প্রায়ই প্রয়োজন হয়, বিশেষ করে যখন একই অপরিবর্তিত স্ক্রিপ্ট একাধিক অ্যাকাউন্টে ব্যবহার করা হয়। যদি স্ক্রিপ্টটি একটি প্রতিবেদন ইমেল করে, তবে প্রাপককে আসল অ্যাকাউন্ট সনাক্ত করতে হবে। আপনি এটির জন্য Account
অবজেক্টের getCustomerId()
পদ্ধতি ব্যবহার করতে পারেন:
let accountId = AdsApp.currentAccount().getCustomerId();
MailApp.sendEmail("customer@example.com",
"Report is ready for " + accountId, report);
Account
অবজেক্টে আপনাকে অ্যাকাউন্টের মুদ্রা এবং সময় অঞ্চল সনাক্ত করতে দেওয়ার পদ্ধতিও রয়েছে।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eAccess attributes of a running script using the \u003ccode\u003eExecutionInfo\u003c/code\u003e object, such as determining if the script is in preview mode with \u003ccode\u003eisPreview()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the \u003ccode\u003eAccount\u003c/code\u003e object to retrieve account information like customer ID (\u003ccode\u003egetCustomerId()\u003c/code\u003e), currency, and time zone, particularly useful when a single script operates across multiple accounts.\u003c/p\u003e\n"],["\u003cp\u003eSimplify debugging and reporting by conditionally executing code based on the script's execution mode and including account-specific details in outputs like emails.\u003c/p\u003e\n"]]],[],null,["# Execution info\n\nInformation about a running script\n----------------------------------\n\nYou can access certain attributes of a running script through the methods of the\n[`ExecutionInfo`](/google-ads/scripts/docs/reference/adsapp/adsapp_executioninfo)\nobject. For example,\n[`isPreview()`](/google-ads/scripts/docs/reference/adsapp/adsapp_executioninfo#isPreview)\ntells you whether a script is currently being previewed or is actually\nexecuting.\n\nThis often simplifies debugging code: \n\n // Code that generates a report.\n // ...\n if (!AdsApp.getExecutionInfo().isPreview()) {\n // Do not email the report when in preview mode!\n MailApp.sendEmail(\"customer@example.com\", \"Report is ready!\", report);\n }\n\nInformation about a script's account\n------------------------------------\n\nAccount information for a running script is often needed, especially when the\nsame unchanged script is used in multiple accounts. If the script is emailing\nout a report, the recipient needs to identify the originating account. You can\nuse the\n[`Account`](/google-ads/scripts/docs/reference/adsapp/adsapp_account)\nobject's\n[`getCustomerId()`](/google-ads/scripts/docs/reference/adsapp/adsapp_account#getCustomerId)\nmethod for this: \n\n let accountId = AdsApp.currentAccount().getCustomerId();\n MailApp.sendEmail(\"customer@example.com\",\n \"Report is ready for \" + accountId, report);\n\nThe `Account` object also has methods to let you identify the account's\ncurrency and time zone."]]