Full Version: Special Business Map for duplicates?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a special business map for duplicates? I'm being asked to handle the duplication of salesorders in a special way and I'd rather not hack...
For duplicates , you can try creating a map with the name SalesOrder2SalesOrder and select Mapping type.
Cool. Could I also collect a field from a related module this way? So when a salesorder is duplicated, collect the payment condition field from the account in stead of taking the source-SO payment condition?
cbMaps support the workflow expressions, so you can use the same syntax to get fields values when you create an email task and select fields to compile the email.

For example from if need the Account Industry field from SalesOrder module, the syntax is: $(account_id : (Accounts) industry)

You can try the same but with you custom field. The easy way is trying to create an email task to SalesOrder module to obtain the expression that you need.

Try it, and tell us if work, please.
I don't have much experience with workflow syntax but I'll try some thingsd and get back here. By the way, how do I contribute my Business Maps to the store?
A small trick: I open a "send email" workflow task against the same module, then go to the body of the email and select the value I want from the picklist. Then you just have to copy and paste.

Either follow the instructions on the documentation project:

or just send it to us and we will upload it. As you prefer.
Good tip, thanks.. I'll fork the documentation as soon as I can.
I've setup a Business Map, but so far it's not working yet. The Business map name is "SalesOrder2SalesOrder", the target module is SalesOrder and the map is as follows:

       <OrgfieldName>$(account_id : (Accounts) exact_payment_cond)</OrgfieldName>

What am I doing wrong here?

It seems I've some error in my workflow expression. When I add this field to the Business Map:

        <OrgfieldName>$(account_id : (Accounts) ship_street)</OrgfieldName>

It clears out the ship street on duplicating, rather than filling out the address from the account.
The <OrgfieldID> directive is important:

means that the value is used exactly as you put it

means that it has to processed as a field, either of the module or of one of it's directly related one (this is what you need)

the value must be passed through the workflow expression parser/engine

It is like the email body with static parts and variables, it is a simple way to avoid having to concatenate all the strings and variables
Ah, makes sense. I'll try and get back to you.

Works like a charm. Thanks!
Pages: 1 2