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 एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-12-22 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-12-22 (UTC) को अपडेट किया गया."],[[["The DocumentTriggerBuilder helps in creating and managing triggers for Google Docs."],["It provides methods like `create()` to finalize the trigger and `onOpen()` to set a trigger for when the document is opened."],["The `onOpen()` method allows you to specify a function to execute when a document is opened, enhancing document automation capabilities."]]],["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"]]