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
I tried setting it to:
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.
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>
Code:
<field>
<fieldname>related_so_id</fieldname>
<Orgfields>
<Orgfield>
<OrgfieldName>$(assets_related_soid : (SalesOrder) salesorderid)</OrgfieldName>
<OrgfieldID>TEMPLATE</OrgfieldID>
</Orgfield>
</Orgfields>
</field>
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.