Y
Y
Yan Cherut2021-10-15 16:02:13
Bitrix24
Yan Cherut, 2021-10-15 16:02:13

Does BP B24 have a function for adding data of one user field of the n-th set of transactions?

Good afternoon! Maybe someone came across the issue of operations with multiple values ​​of one custom field in different deals. Let's say I have a value that represents a limit and is tied to one company performer #1. And there are many transactions with customer companies #2..10, which, according to the amount field, amount to the amount of the established limit for company #1. Is it possible in the cloud in the BP to bypass all transactions by filtering and adding the values ​​​​of the transaction amount fields in order to check whether the limit has been exceeded or not before creating a transaction.

I'm looking towards an iterator that would sort through the deal amounts associated with executor #1, but I still don't understand how to add the resulting values. Pass values ​​to multiple variable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Nikolaev, 2021-10-21
@gromdron

The secret of a good process is its simplicity.
The easiest way is to have 2 fields in the company: Current value and Value limit.
There is a field in the transaction that describes its value (assume a multiple field) and the total value.
When creating a deal with an iterator, we calculate the "Total value" of the deal.
As soon as the calculation is made, we ask the company for the Current value and Limit values ​​​​and compare so that the current value is not greater than the Limit.
If more, we reject the deal, etc. In general, we are working on the process of exceeding.
If less, update the Company's Current Value as Company's Current Value + Total Value.
As soon as the trade succeeds or fails, a recalculation must be performed, i.e. subtract the total value of the transaction from the current value of the company to release the limit.
I suppose that it would be nice to do the following additionally:
- Keep in the transaction "Accounting Flag in the company", which is set to Yes, if the transaction is taken into account in the current value and No, if its value did not modify the company.
- Change the Current value (increase or decrease) to be implemented by a business process with logging into the history of the company - from which entity, which action and which logging.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question