Y
Y
Yuri Strelkov2022-04-07 12:51:07
Bitrix24
Yuri Strelkov, 2022-04-07 12:51:07

How to move a stage N times before the due date?

Good afternoon. A smart process that has a start and end date.
Start date - today
End date - set by the manager.

It is necessary that the smart process moves to the follow-up stage, 5 days before completion. This smart process can hang from 1 to 12 months. The BP must check the completion date every day.
It would seem that the task is simple, but I don’t understand what algorithm the BP will be?

If anything, smart processes are similar to transactions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Zhgilev, 2022-04-07
@darknes46

As an option to do this, create a loop that will check the End Date 1 time per day:
1. Read the local time
2. Check the difference between the local time and the End Date
3. If the difference is more than 5 days, then restart the loop after 1 day (activate Pause in execution )
4. If the difference is 5 days or less, then change the stage of the transaction
Condition:
=dateadd({{Дата завершения}},"-5d")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question