Class DocumentTriggerBuilder
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
दस्तावेज़ट्रिगरबिल्डर
दस्तावेज़ ट्रिगर के लिए बिल्डर.
ज़्यादा जानकारी वाला दस्तावेज़
create()
नया ट्रिगर बनाता है और उसे दिखाता है.
वापसी का टिकट
Trigger
— नया ट्रिगर.
onOpen()
दस्तावेज़ खोलने पर ट्रिगर होने वाला ट्रिगर तय करता है.
const document = DocumentApp.getActiveDocument();
ScriptApp.newTrigger('myFunction').forDocument(document).onOpen().create();
वापसी का टिकट
DocumentTriggerBuilder
— चेन बनाने के लिए यह DocumentTriggerBuilder
.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],["The `DocumentTriggerBuilder` class facilitates the creation of triggers for Google Documents. Key actions include `create()`, which generates and returns a new `Trigger` object, and `onOpen()`, which configures the trigger to activate when the document is opened. The `onOpen()` method returns the `DocumentTriggerBuilder` instance, allowing method chaining. The provided example demonstrates creating a trigger that runs \"myFunction\" upon document opening.\n"],null,[]]