This discussion is archived
3 Replies Latest reply: Nov 16, 2012 2:26 AM by Fabien D. RSS

submitMAp issue with a system generated UIMap

Fabien D. Newbie
Currently Being Moderated
Hello,

I've an issue when trying to create a zone dedicated to read and update the Autopay informations of accounts.

I first defined a BO based on the ACCOUNT MO :

<schema>
<accountId mapField="ACCT_ID"/>
<accountManagementGroup mapField="ACCT_MGMT_GRP_CD"/>
<accessGroup mapField="ACCESS_GRP_CD"/>
<accountAutopay type="list" mapChild="CI_ACCT_APAY">
<accountAutoPayId mapField="ACCT_APAY_ID"/>
<accountId mapField="ACCT_ID"/>
<startDate mapField="START_DT"/>
<endDate mapField="END_DT"/>
<autopaySource mapField="APAY_SRC_CD"/>
<externalAccountId mapField="EXT_ACCT_ID"/>
<expireDate mapField="EXPIRE_DT"/>
<entityName mapField="ENTITY_NAME"/>
<comments mapField="COMMENTS"/>
<version mapField="VERSION"/>
<autopayMaxWithdrawalAmount mapField="APAY_MAX_WDRWL_AMT"/>
<autoPayMethod mapField="APAY_METHOD_FLG"/>
</accountAutopay>
</schema>

Then I created a UI map based on it :
<schema>
<includeBO name="Z-ACC-IBAN-1"/>
</schema>

and generated the HTML with "Generate HTML / Input Map" in the dashboard (see at the end).

Then I created a F1-MAPEXPL zone based on the BO, UI Map and current context:
Display Object     bo=Z-ACC-IBAN-1
UI Map               map=Z-ACC-IBAN-1
XML Parameter 1     name=ACCT_ID targetPath=accountId sourceLoc=G

The result is fine to get the account AutoPay information, but I get an error "Function submitMAp can only be run from a BPA script" when trying to update the data (clic on save button)

Does someone have a clue of how to correct my settings ?

Thanks


-- UI Map generated HTML
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="cisDisabled.css" type="text/css" rel="stylesheet">
<link href="cisEnabled.css" type="text/css" rel="stylesheet">
</head>
<body oraError="automate:true; prefix:boGroup">
<table cellpadding="12" width="100%">
<tr class="oraErrorText">
<td><a onclick="oraShowErrorAlert(); return false;" href=""><span oraErrorVar="ERRMSG-TEXT" class="oraErrorText"></span></a></td>
</tr>
</table>
<table cellspacing="4" width="100%">
<colgroup>
<col class="oraLabel oraTableLabel">
<col class="oraNormal oraTableData">
</colgroup>
<tr>
<td oraLabel="accountId"></td><td><input class="oraInput" oraField="accountId"></td>
</tr>
<tr>
<td oraLabel="accountManagementGroup"></td><td><input class="oraInput" oraField="accountManagementGroup"></td>
</tr>
<tr>
<td oraLabel="accessGroup"></td><td><input class="oraInput" oraField="accessGroup"></td>
</tr>
<tr>
<td class="oraEmbeddedTable oraSectionEnd" colspan="2">
<div class="oraGridDiv">
<table cellspacing="2" oraList="accountAutopay" onResize="if (this.clientWidth > this.parentNode.clientWidth) { this.parentNode.className += ' oraGridDivScroll';};">
<thead>
<tr>
<td class="oraGridColumnHeaderButton"></td><td class="oraGridColumnHeaderButton"></td><th nowrap oraLabel="accountAutoPayId" class="oraGridColumnHeader"></th><th nowrap oraLabel="accountId" class="oraGridColumnHeader"></th><th nowrap oraLabel="startDate" class="oraGridColumnHeader"></th><th nowrap oraLabel="endDate" class="oraGridColumnHeader"></th><th nowrap oraLabel="autopaySource" class="oraGridColumnHeader"></th><th nowrap oraLabel="externalAccountId" class="oraGridColumnHeader"></th><th nowrap oraLabel="expireDate" class="oraGridColumnHeader"></th><th nowrap oraLabel="entityName" class="oraGridColumnHeader"></th><th nowrap oraLabel="comments" class="oraGridColumnHeader"></th><th nowrap oraLabel="version" class="oraGridColumnHeader"></th><th nowrap oraLabel="autopayMaxWithdrawalAmount" class="oraGridColumnHeader"></th><th nowrap oraLabel="autoPayMethod" class="oraGridColumnHeader"></th>
</tr>
</thead>
<tbody>
<tr>
<td oraType="addGridRow"></td><td oraType="deleteGridRow"></td><td class="oraNormal"><input class="oraInput" oraField="accountAutoPayId"></td><td class="oraNormal"><input class="oraInput" oraField="accountId"></td><td class="oraNormal"><input class="oraInput" oraField="startDate"></td><td class="oraNormal"><input class="oraInput" oraField="endDate"></td><td class="oraNormal"><input class="oraInput" oraField="autopaySource"></td><td class="oraNormal"><input class="oraInput" oraField="externalAccountId"></td><td class="oraNormal"><input class="oraInput" oraField="expireDate"></td><td class="oraNormal"><input class="oraInput" oraField="entityName"></td><td class="oraNormal"><input class="oraInput" oraField="comments"></td><td class="oraNormal"><input class="oraInput" oraField="version"></td><td class="oraNormal"><input class="oraInput" oraField="autopayMaxWithdrawalAmount"></td><td class="oraNormal"><select oraSelect="lookup:APAY_METHOD_FLG" class="oraInput" oraField="autoPayMethod"></select></td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td class="oraSectionStart oraEmbeddedTable" colspan="2">
<table cellspacing="2">
<tr>
<td><input onClick="oraSubmitMap('SAVE');" oraMdLabel="SAVE_BTN_LBL" class="oraButton" type="button"><input onClick="oraSubmitMap('CANCEL',false);" oraMdLabel="CANCEL_LBL" class="oraButton" type="button"></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<xml style="display:none;"></xml>
</html>

Edited by: Fabien D. on Oct 26, 2012 11:49 AM
  • 1. Re: submitMAp issue with a system generated UIMap
    Jagadeesh P Newbie
    Currently Being Moderated
    Hi Fabien,

    The solution is not simple.
    The purpose of F1-MAPEXPL zone is to display information using "Display Maps" only.
    It cannot handle Maintenance UI Maps (like the one you created).

    so, you have to create 2 UI Maps for a BO, (1 Display and 1 Maintenance UI Map).
    You include Display UI Map in F1-MAPEXPL zone.
    When you click edit in Display UI Map, It invokes a Maintenace BPA script that invokes the Maintenance UI Map.
    You update data in Maintenance UI map and click save (invoking submitMap which returns the data to BPA script).

    The BPA script takes care of updating the information (eg: using BO update)
    and the updated value gets refereshed in the F1-MAPEXPL (display) zone.

    you can refer to following BO : C1-AdjustmentApprovalProfile for more information.
    Display Map : C1-AdjustmentAProfDisplay
    Maintenance Map: C1-AdjustmentAProfAddUpdate

    Mavigation : Admin -> A -> Approval Profile (broadcast any approval profile and examine the display zone which invokes the BPA script on edit button click)
  • 2. Re: submitMAp issue with a system generated UIMap
    954933 Newbie
    Currently Being Moderated
     
  • 3. Re: submitMAp issue with a system generated UIMap
    Fabien D. Newbie
    Currently Being Moderated
    Hi Jagadeesh,

    Thanks for your answer. I'll try to setup this new config using the examples...

    Fabien

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points