0
votes

I'm facing some issue with returning value back to the parent page. Please kindly help..

Here is complete setup of my page.

Home page has 2 regions.

  1. Static Region: This has 2 text fields A and B. B has dynamic action defined for Get Focus event.Selection type:Items.Item is text field B Dynamic action has 2 True actions. first is having action as refresh and selection type as region. Region is classic report region Second is "Execute Java Script code" with below code. Selection type:Items.Item is text field B openModal(static id of classic report region);

  2. Classic report region This has type as Classic report and template as Inline dialog. Page Items to Submit is text field A source is below sql query.

    SELECT empno FROM A, B
    where A.empno=B.empno AND
    A.NAME = :P1_textfieldA;
    

Here i made column EMPNO as link and gave target as javascript:passBack(#EMPNO#);. this pass back methodis defined in the Home page ->Header Text region as below

    <script language="JavaScript">
    function passBack(passVal1)
    {
    parent.$x('P1_textfieldB').innerHTML = passVal1;
    }
    </script>

when i test the above code, i am able to get the value i select in popup in to pass back function. But its failing to set parent field(text field B) with the selected value. Neither the dialog is closed. Its not showing any errors also.

1

1 Answers

0
votes

Solved this issue by using JS API apex.item to define target url in link column.

    Target Type: URL
    URL: javascript:$s('PX_ITEM_TO_BE_SET',#COLUMN_VAL_TO_PASS#);closeModal();