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 trace the flow of execution

anand_gpAug 2 2017 — edited Aug 4 2017

Hi,

In a master-detail form (apex 4.2.6), the detail region holds product sale details. As you can see from below image, the 1st field gets ITEM name and next field gets BATCH_NUMBER. Only after these two selection, the javascript fetches other details like MRP, COST_PRICE, TAX, etc., But that script doesn't fill AMOUNT column. However, I observe that, as soon as I select ITEM, the AMOUNT column is set with NaN. Not sure which line of code setting the value of AMOUNT. Is there a way to debug this flow?

pastedImage_1.png

Javascript which is triggered after selection of ITEM (1st column) -

function f_fetch_item_dtls(pThis) {

var ajaxResult;

var row_id = pThis.id.substr(4);

var v_item_code = 'f04_'+row_id;

var v_batch = 'f06_'+row_id;

var ItemCodeVal = document.getElementById(v_item_code).value;

var BatchVal = document.getElementById(v_batch).value;

var v_mrp = 'f08_' + row_id;

var v_cost = 'f09_' + row_id;

var v_tax = 'f10_' + row_id;

var v_exp_mon = 'f13_' + row_id;

var v_exp_year = 'f14_' + row_id;

$s(v_mrp,"");

$s(v_cost,"");

$s(v_tax,"");

$s(v_exp_mon,"");

$s(v_exp_year,"");

apex.server.process ( "GET_ITEM_DETAIL_SALE", {

x01: ItemCodeVal,

x02: BatchVal

}, {"dataType":"text",

success: function( pData ) {

ajaxResult = pData;

empDtlsJSON = $.parseJSON(ajaxResult);

$('#'+v_mrp).val(empDtlsJSON.MRP);

$('#'+v_cost).val(empDtlsJSON.COST_PRICE);

$('#'+v_tax).val(empDtlsJSON.TAX_PERCENT);

$('#'+v_exp_mon).val(empDtlsJSON.EXPIRY_MONTH);

$('#'+v_exp_year).val(empDtlsJSON.EXPIRY_YEAR);

}

} );

}

On Internet Explorer, if I right-click and "inspect element", I see below debugger detail, but don't know how to step through to know where exactly AMOUNT column is getting set. Can someone clarify please.

pastedImage_7.png

Thanks,

-Anand

This post has been answered by Pranav.shah on Aug 2 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2017
Added on Aug 2 2017
13 comments
280 views