Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1365 Ansichten

We set up an automated action to post a message in the general chat whenever an opportunity moves to the Invoice Paid | Won stage in CRM. However, it’s not working as expected it gives me error:

Could you help us check what the issue might be and how to resolve it?

Here’s what was done:

  1. Enabled Developer Mode.
  2. Created an automated action under Settings → Technical → Automated Actions with the following details:
    • Model: CRM Lead/Opportunity (crm.lead)
    • Trigger: On Update
    • Field: Stage ID → Changed to "Invoice Paid | Won"
    • Action To Do: Execute Python Code

The Python script used:


channel = env['mail.channel'].search([('name', '=', 'general')], limit=1) if channel: message_body = f"TEST 🎉 A new deal has been won! {record.name} is now in the 'Invoice Paid | Won 🎖' stage! 🚀" channel.message_post(body=message_body, subtype_xmlid="mail.mt_comment")

Can someone have idea what might be causing the issue and how to fix it?
Thanks

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juni 25
1056
1
Jan. 25
1762
2
Dez. 24
1462
1
Nov. 24
155
2
Apr. 24
1870