Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2622 มุมมอง

Sales uses activities and when they mark them as completed they want that the date last edited would be updated.

So when they view CRM/Leads in list view they could sort on this date.

We want to update the field write_date on crm.lead when an activity is marked as completed.

I've already tried to create an automated action on type Lead/opportunity that is actived on modification of triggerfield Activities (crm.lead) to update field Last edited with a python expression write_date.time

This doesn't seem to work, what am i doing wrong? 

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

I've tried the expression on step 2 but that didn't work.

How can i create the logging asked in step 1?

In step 2 you talk about an alternative method but i don't know how to accomplish writing another value twice.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Let's separate this into two possible problems: 

1: Your trigger does not get activated. (Try creating a logging record at the beginning of the python code expression to verify if it activates)

2: Your value update itself does not work. Try to see if you can have the python code work using "record.write({'write_date': datetime.now()})"
Alternatively, while it is suboptimal, you can also opt to write another value twice (once to a new value and then back to the original). This will have the write_date updated for sure. 


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 25
1881
2
ส.ค. 23
2057
2
เม.ย. 25
16747
1
พ.ย. 21
3542
0
พ.ค. 20
2843