This is the 3rd post of the series where we explored the flexibility and potential of the extensibility of ACRM.
On the previous posts we went through the basic usage of the Activity Templates and tailored it to specific needs:
- Using and Extending the Activity Template feature (Post 1 of 3)
- Using and Extending the Activity Template feature (Post 2 of 3)
In this post we will implement the remaining requirement:
3. The name and email signature of the user must be added to the activity text with the following format
Important: The changes described in this post should not be applied directly to a production system, especially the changes involving the Data Model and CRM.designer configurations. Careful testing should be performed to eliminate the possibility of human error following the instructions or unexpected interactions with pre-existing customizations.
By default, the Signature of a user can be defined in the Rep(ID) info area.
In the ISI template for the BTB vertical, the field 107(Plain Text) and 5006(HTML) are used.
Automatic Creation of the Signature
Our requirements call for a simple but consistent signature across all users.
A good way to obtain consistency is by automating the creation of the signature.
The required signature has 3 components obtained from 3 different info areas as follows:
|Company Name||Company (FI)|
|First Name, Last Name||Rep (ID)|
|Job Title||Contact Person (CP)|
Let's define a Trigger that gathers the information from the different info areas and combines them into the complete HTML formatted signature.
To embed the data within HTML tags we will use Regular Expressions.
|Field||Function||Field Contents||Reference Function||Variable||Direct Reference||Reference|
|Signature||Append||t,(.*),'<br>--<br><b>$1</b>',,,1,;,,||Regular Expression||Rep > Company > Company|
|Signature||Append||(space character)||Last Name|
|Signature||t,(.*),'<br><i>$1</i>',,,1,;,,||Regular Expression||Rep > Contact Person > Job Title|
After the Trigger is configured in the relevant Rights format the Signature is added whenever a Rep is created or modified.
The signature can be previewed Using the Rep Maintenance pages of CRM.web.
Now that we have a consistent signature automatically created for every user, let's use it the activities.
To keep the signature handling independent of the rest of the activity creation automation, we will create a new trigger.
|Text||Append||Activity > Rep > Signature|
For the trigger to run it needs to be added to the relevant Rights Format. We will add it before the trigger CU_MA_Append_Disclaimer created in the 2nd blog post of this series.
As was our final goal, following the creation of an activity both the signature and disclaimer are appended to the text.
This post concludes the series. We hope the content is informative and can provide inspiration on how simple changes to ACRM can express the particular business logic and culture of your organization.
We welcome you to comment and discuss this and other topics in the ACRM space of AureaWorks.