This article outlines the new “Insert”-functionalities within the “Computed Items”-button in Open Office XML template (.docx). The “Insert Computed-Fields”-button allows you to make basic arithmetical operations with CRM-number-fields. Important: It is crucial that the CRM-fields contain a number!
Requirements: Available for DocumentsCorePack for MS CRM 2013, v6.10 and higher. All our addons come with a 14 days free trial! Please click here to download and test it!
Figure 1: Use the math functions of the Computed-Fields functionality and a possible result after the merge.
The new “Computered Items”-button contains following new functionalities:
Click here to read more about the other useful functionalties of the “Insert”-button.
The “Insert Computed-Fields”-button allows you to make basic arithmetical operations with CRM-number-fields. Important: It is crucial that the CRM-fields contain a number! There are already predefined CRM-number-fields.
Note: You can define other CRM-fields to be a number field. E.g: if you don’t need the “Middle Name”-field in the contact entity and rather prefere to type in any number, this field can also be inserted and calculated! In this case you will see next message box:
HOW TO: Use the “Insert Computed-Field”-button, step-by-step description
1. Open DocumentsCorePack Task Pane
You can find the new function in the “DocumentsCorePack Task Pane”. To get there, please open an existing or create a new template. Got to the "www.mscrm-addons.com"-tab, click on “Insert MailMerge Fields” in the toolbar and create a “Office Open XML (.docx)“-document by answering the question with [Yes]. See screenshot below:
Figure 5: Open DCP Task Pane
The “DocumentsCorePack Task Pane” appears.
2. Choose the appropriate "Insert"-functionality
Click on the [Insert] drop-down-button and choose the "Insert Advanced String"-functionality. See next screenshot:
3. Add/Subtract/Divide/Multiply CRM-number and money-fields
In the next window you have the possibility to make basic arithmetical operations with CRM-number-fields by inserting add +, subtract –, divide / and multiply * number-fields with a double-click. You can also define a name for this field e.g. “Invoice Dec. 213”. If no name is typed in the default name “Computed Field” will be set.
4. The result
If the calculation can be performed you will see the result value in the merged document.
Figure 9: Result
If the calculation can not be evaluated you will see this result in your document. This might be the case if your calculation uses a string field that does not contain a number as a value. See next screenshot, click to enlarge:
Figure 10: Result - Error
That’s it! We appreciate your feedback! Please share your thoughts by sending an email to firstname.lastname@example.org.