Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to stop apex engine after apex.server.process in JS DA?

ApexMeisterAug 17 2020

I'm using apex 20.1 and universal theme.

I have a page with IG like below where if user changes the qty/uni cost and Ext Cost, it needs to do a computation.

Example if ext cost is changed to 1000 and the qty = 20, the DA need to modify the uni cost = ext cost / qty.

For this I created a JS DA using apex.server.process.

On the DA, I'm using below to set the value, since this is IG I put a static ID of IG_COLUMN_NAME = IG_UNIT_COST.

               apex.item(gReturn.items\[i\].name).setValue(gReturn.items\[i\].value,'',true);

If I just use a STD JS and run the apex.item it works fine, I can see my unit cost changing to a computed value.

My issue is since I'm using apex.server is async, IG completes the validation moves to the next record and my ajax call runs afterwards.

Is there a way in JS to stop the execution or basically fail the validation so the IG row DO NOT move and you can still change the item value?

Thanks

pastedImage_0.png

Comments
Post Details
Added on Aug 17 2020
0 comments
340 views