Good morning
I need to change the AccountEntityID in a Sync.ItemMaster BOD and do NOT want to have that in the mapping as constant.
Therefore, in my document flow, I created a connection point with a stored procedure that uses this statement to change the company number:
set @xmlout.modify('replace value of (/DataArea/Sync/AccountingEntityID[1]/text())[1] with sql:variable("@comp")'
;
It works perfectly, BUT, it removes the namespace, version (red) etc. behind SyncItemMaster:
BEFORE:
<?xml version="1.0"?>
<SyncItemMaster xmlns="">schema.infor.com/.../2" xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xsi:schemaLocation="schema.infor.com/.../2 ">schema.infor.com/.../SyncItemMaster.xsd" xmlns:xsd="">www.w3.org/.../XMLSchema" releaseID="9.2" versionID="2.14.0">
<ApplicationArea>
<Sender>
<LogicalID>lid://infor.ln.ln_gc</LogicalID>
<ComponentID>erp</ComponentID>
<ConfirmationCode>OnError</ConfirmationCode>
</Sender>
<CreationDateTime>2022-12-21T15:58:35Z</CreationDateTime>
<BODID>infor-nid:infor:112::P01031012:?ItemMaster&verb=Sync</BODID>
</ApplicationArea>
<DataArea>
<Sync>
<TenantID>infor</TenantID>
<AccountingEntityID>112</AccountingEntityID>
....
AFTER:
<SyncItemMaster releaseID="9.2">
<ApplicationArea>
<Sender>
<LogicalID>infor.databaseartikel_bwtinterface_artikel_bwtinterface_gc_ln_artikel</LogicalID>
<ComponentID>External</ComponentID>
<ConfirmationCode>OnError</ConfirmationCode>
</Sender>
<CreationDateTime>2022-12-21T15:58:37.581Z</CreationDateTime>
<BODID>infor.databaseartikel_bwtinterface_artikel_bwtinterface_gc_ln_artikel:1671638317581:1150488:0</BODID>
</ApplicationArea>
<DataArea>
<Sync>
<TenantID>infor</TenantID>
<AccountingEntityID>440</AccountingEntityID>
This leads to the effect that the mapping that follows returns no data any more.
How can I keep the red part despite using a stored procedure?
Or is there another dynamic way of change the company number (AccountEntityID)? (I read this from a table from within Infor LN database)
Thank you and kind regards
Matthias