Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3034 Lượt xem

I cannot figure out how to get the emails of all the sales team to send an email to them. I have set up an Automated Action to send an email when a Lead is created. I want the email to go to the entire sales team but i am unable to figure out how to get all of them.

{{ object.team_id.member_ids }} This returns the user_ids of the team but not the email

{{ object.team_id.member_ids.email }} This errors when i create a lead.

{{ ','.join(map(str, object.team_id.member_ids.mapped('email'))) }} This errors when i create a lead.


Ảnh đại diện
Huỷ bỏ
Tác giả

This works! Thank you.

Câu trả lời hay nhất

Hi Sean,

Try this on the "To (Partners)" field of your email template;

{{','.join([str(partner.id) for partner in object.team_id.member_ids.mapped('partner_id')])}}

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you for your reply. Python code you are talking about seems pretty involved in terms of sending emails. Is there an easy way to have python use an existing email template to send without recreating an email in python?

Hi Sean,
Try the above. I tried it and it works fine

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 23
1586
1
thg 9 25
1454
2
thg 8 25
2150
0
thg 5 25
987
0
thg 8 24
1251