Update other columns based on a single column

Hello all,

 

I have a page detail that contains item transfer information.

Every item has 2 types of units (uom), big unit and small unit. Every unit has its own conversion to each other.

So, every time the user enters the "ship quantity", I want the system to calculate the big unit and the small unit, and then update it to the UI.

The "ship quantity" uses either the big unit or the small unit.

 

Currently I use a business process to calculate the big and small quantity. 

So, every time the user enters the "ship quantity", a request will be sent to call the business process. All of this is done in the detail page.

Then, once the business process has done the calculation, it sends the message to the UI, which will be captured by the UI script and shows it to the screen. 

The problem is after the "Ship quantity" of the first row is entered, the user clicks on the second row, the first row's big and small quantities are not updated.

Below is the snippet of my code that updating the row.

body is the return from the business process that the system called earlier.

How to solve this problem?

I wish Creatio has "row lost focus" event that might can help to solve this problem.

 

Any ideas will be appreciated.

 

Thanks,

David.

Like 0

Like

1 comments

Hello David,

Most likely your data isn't updating because it wasn't set. this.getGridData will not work on the edit page. I made the logic on the Order page, to do such:

Replace the OrderProductPageV2 module and write code there instead of a business process. Put the business process handler in the editing page module. Add the required parameters to BP and use them later in your custom module by get/set:

var currentPrice = this.get(“Price”);
this.set(“Price”, “some value”)

 

Show all comments