Extension Hooks
Rules attached to named points in a record's life: before or after it is saved, posted or approved, and when its status changes. A hook is a condition (the same expression language as custom rules) and one action: refuse with a message, warn, send on one of this company's webhooks, or write a log line. A hook cannot change a record or run code. New hooks start in dry run: evaluated and logged, never acting, until you switch them live. To fill in, work out, check, show or lock a field, use Custom Logic instead.
اسے کہاں تلاش کرنا ہے۔
- ماڈیول: پلیٹ فارم
- گروپ: آٹومیشن
- سیکشن: Extension Hooks
- سکرین: Extension Hooks
کنسول میں پتہ: /platform/extension-hooks
فہرست · 11 کالم · 15 اس کی شکل پر فیلڈز · 4 ان میں سے ضروری ہے · 4 اعمال
فہرست کیا دکھاتی ہے۔
یہ فہرست کے کالم ہیں، جس ترتیب سے وہ تیار کیے گئے ہیں۔ ان میں سے کسی کو بھی ترتیب دیا جا سکتا ہے، فلٹر کیا جا سکتا ہے، چھپا یا برآمد کیا جا سکتا ہے۔
| کالم | قسم | فیلڈ کا نام |
|---|---|---|
| Hook | متن | name |
| Point | حیثیت | point |
| ماڈیول | کوڈ | module_key |
| سکرین | کوڈ | resource_key |
| کرتا ہے۔ | حیثیت | action_kind |
| موڈ | حیثیت | mode |
| چلتا ہے۔ | نمبر | run_count |
| انکار کر دیا۔ | نمبر | veto_count |
| غلطیاں | نمبر | error_count |
| پر | ہاں یا نہیں؟ | is_active |
| Last problem | متن | last_error |
فارم
جب یہاں ریکارڈ بنتا ہے تو کیا پوچھا جاتا ہے۔ مطلوبہ فیلڈز نشان زد ہیں؛ کنفیگریشن لسٹ سے اخذ کردہ انتخاب وہ ہے جسے ایڈمنسٹریٹر بغیر ریلیز کے بڑھا سکتا ہے۔
| میدان | قسم | انتخاب | نوٹس |
|---|---|---|---|
| نام مطلوبہ | متن | A name people will recognise in the run log. | |
| یہ کس کے لیے ہے۔ | لمبا متن | Why this rule exists. | |
| Point مطلوبہ | انتخاب | Before a record is saved, After a record is saved, Before a document is posted, After a document is posted, Before an approval is given, After an approval is given, Before the status changes, After the status changed | When in the record's life the hook runs. |
| سکرین مطلوبہ | انتخاب | موجودہ ریکارڈ سے دیکھا | The screen whose records the hook watches, e.g. CRM › Accounts, or a custom object. "Every screen" covers the whole module (not for a hook that refuses). |
| کرتا ہے۔ مطلوبہ | انتخاب | Refuse with a message (before points only), Warn but allow (before points only), Send on a webhook (after points only), Only write it in the run log | Only a before hook can refuse or warn; only an after hook can send. |
| حالت | لمبا متن | When the hook acts, e.g. total > 10000 and is_empty(project_code). Empty means always. You may use record fields, previous, changed, status, to_status, user and today. | |
| پیغام | متن | What a person is told. {field} is replaced by the record's value. | |
| Message (as an expression) | متن | Optional: work the message out, e.g. concat("Over budget by ", total - 10000). | |
| Only when moving to | متن | For the status points: comma-separated statuses; empty means any move. | |
| ویب ہُک | انتخاب | موجودہ ریکارڈ سے دیکھا | One of this company's outbound webhooks. It signs and screens the target like every delivery. |
| What is sent | متن | A set of named expressions, e.g. {"number": "record_no", "total": "total"}. Empty sends the record without personal or secret fields. | |
| آرڈر | نمبر | Hooks at the same point run in this order. | |
| Time budget (ms) | نمبر | 10 to 500. A run over it is skipped and counted as an error. | |
| Runs per minute | نمبر | A ceiling for warnings, sends and log lines (a refusal is never throttled). | |
| پر | ہاں یا نہیں؟ | A hook that fails ten runs in a row is switched off with the reason; switch it on again after fixing it. |
آپ یہاں کیا کر سکتے ہیں۔
ٹیسٹ بنیادی
Try this hook without running it
پوچھتا ہے: Sample record (JSON) Or a real record id
Switch live
تصدیق کے لیے پوچھتا ہے: Switch this hook live? It will refuse, warn or send on real saves from now on.
Back to dry run
تصدیق کے لیے پوچھتا ہے: Put this hook back in dry run? It stops acting at once and is only evaluated and logged.
Run log
قوانین جو یہاں لاگو ہوتے ہیں۔
اس اسکرین پر موجود ہر چیز اپنے اصولوں کے بجائے پلیٹ فارم کے قوانین کی پابندی کرتی ہے۔ اسے استعمال کرنے سے پہلے جاننے کے قابل ہیں:
- فہرست کو تنگ کرنا — تلاش، حالات، ترتیب، ٹوٹل، برآمد اور محفوظ کردہ خیالات۔
- کیا تبدیل کیا جا سکتا ہے — پانچ بنیادوں پر ریکارڈ میں ترمیم نہیں کی جا سکتی ہے۔
- کمپنیاں اور کاروباری اکائیاں — اس فہرست کے اوپر سوئچر اس کے ساتھ کیا کر رہا ہے۔
- ریکارڈ بنانا — مطلوبہ فیلڈز، انتخاب کہاں سے آتے ہیں، اور نمبر کیسے مختص کیا جاتا ہے۔
- اسپریڈشیٹ درآمد کرنا — یہ اسکرین ایک کو قبول کرتی ہے، اور یہ ٹائپنگ جیسے ہی اصولوں کے ذریعے چلتی ہے۔