Messaging templates

I am new to Axelor and my first impressions are very good. I have been spending a few weeks getting to understand the theory behind the application and have a relatively good grasp. Getting things set up nicely now and starting to use in anger. :slight_smile:

However I am struggling around the messaging templates and how to introduce variables into them.

I am trying to start with something straightforward (at least I hope so) and that’s a more informative subject line and including a link/uri to the object in which a message was left in the email notification that is sent to the followers.

If I leave the AppBase “Default mail message template” configuration alone, I receive an email with the ‘task’ name/title as the subject line and in the body of the email I get the message that was left.

I would like to modify the subject line to include a prefix such as "Axelor CRM: " and then the existing message so that I can easily spot them in the email client.

Also I would like to include the URL of the task (or whatever) in which the message was left.

I’ve had a look at the templates provided with the default installation - specifically the “Contact Details Confirmation” (either the French or English version) and can see that there are a number of fields in use associated with the Partner model.

I have tried creating my own templates, assigning a model to them - either Partner, Project or AppBase, and then trying to reference variables in the message body like the ContactDetailsConfirmation. Nothing allows the addition of things like $Partner.firstName$ into the body and if you change the subject line, it only shows what is written in the template and doesn’t include the object information like it does in the default version.

Also, in the message template config screen, what is the “Context” panel used for?

Can anyone help?

Many thanks
Simon

Hi,
It is a general template for all models, so it will not work for model specific fields. Still you can refer to the related model with entity, so in your case it will be $entity.firstName$ for partner.
Getting the url of the record is not possible, but you can check the message generated without a template, it contains the url to open the related record, you can follow the same.