Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My Field Map tries to transport a webservice ID
#1
I am creating a workflow that creates an entity of recordtype A (custom module I wrote) when an asset is created for the first time. I filled out the mandatory fields in the workflow screen and have also setup a Field Business Map that more closely determines which fields should be transported from the Asset to the record to be created FROM that Asset.

Now when creating the asset I get the 'Sorry! Attempt to access restricted file' message. I turned on debugging and found out that the workflow tries to create the 'recordtype A', it tries to insert into the entitytable some values of which one is in webservice format. This is a SalesOrder ID that I get from the Asset through a FIELD directive in the Business Map.

The field directive looks like this
Code:
   <field>
     <fieldname>related_so_id</fieldname>
     <Orgfields>
       <Orgfield>
         <OrgfieldName>assets_related_soid</OrgfieldName> {Field I created on Assets}
         <OrgfieldID>FIELD</OrgfieldID>
       </Orgfield>
     </Orgfields>
   </field>
I tried setting it to:
Code:
   <field>
     <fieldname>related_so_id</fieldname>
     <Orgfields>
       <Orgfield>
         <OrgfieldName>$(assets_related_soid : (SalesOrder) salesorderid)</OrgfieldName>
         <OrgfieldID>TEMPLATE</OrgfieldID>
       </Orgfield>
     </Orgfields>
   </field>
Which managed to create the new record but still failed to transport the salesorderid from the Asset to the new record.


Beware
This BusinessMap does work (with the first code example). When I manually create a new 'record A' type from the asset, the map does its job, also correctly in transporting the salesorder ID from the Asset to the new record.
Reply


Messages In This Thread
My Field Map tries to transport a webservice ID - Guido1982 - 03-21-2019, 08:35 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)