MSwordReport
Macros
localization
Studio_Creatio
8.0

В настройках MS Word репорта должен использовать локализацию не смотря на язык системы, возможно ли это ?
 

Например сейчас есть такое макрос
 

Id[#SalesUp|FinAppBorrower#]
 

Она меняется если язык системы поменялось.

Как можно указать в макросе  чтобы использовалось локализацию на английском только?

Like 0

Like

1 comments

Здравствуйте,

 

К сожалению, в приложении нет возможности отображать значения полей в отчете на языке, отличном от текущей локализации пользователя, а так же делать отчеты на разных языках (чтобы можно было выбрать язык значений полей, отображаемые в отчете (независимо от локализации) во время создания отчета).

Все значения в отчете будут отображаться на языке текущего пользователя.
Чтобы значения печатались на английском или другом языке, необходимо сделать соответствующие переводы в системе и изменить локализацию пользователя на английский или другой язык соответственно. Затем значения будут подтянуты в отчет на выбранном языке.

 

Распечатать сам отчет или значения в нем на языке, который не установлен для текущего пользователя, пока невозможно.

 

При этом задача по добавлению этого функционала уже передана ответственной команде. 

Show all comments

Hello!

 

In this article, we will describe how to work with macros and filling in the values.

 

This functionality was added specifically so that the user could clearly see that there are no values in these fields and that it is necessary to manually edit such an email before sending it.
 

To solve this issue, you can configure the mandatory filling of the fields used in the template for the template to be sent correctly.

Also, as part of sending emails through a process, you can add additional logic to the process itself by setting up two branches (containing and not containing data) using two email templates:
1) with macros
2) without macros
 

In general, to resolve the issue, make these fields mandatory when creating a record, or edit emails before sending them (in the process, check the “Send email manually” box for the [Send email] element), or reconfigure the process by creating two branches as described above.

 

Also, there is another way to resolve it.

 

In the business processes and bulk emails, macros are already empty when the data is not filled in. In the UI you would need to do the following to remove the macro description: 

You would need to create your own service, copying InvokableMacrosHelperService, change macrosHelper instantiation to use Factory: 

            var macrosHelper = new InvokableMacrosHelper { UserConnection = UserConnection };
to 
            var macrosHelper = ClassFactory.Get()
After that, you would need to override the ReplaceMacros(string template, List macrosInfo) method in class InvokableMacrosHelper (using [Terrasoft.Core.Factories.Override]) to change the macro to an empty value instead of a highlight instead:
 protected override string ReplaceMacros(string template, List macrosInfo) {
      string result = template;
      foreach (MacrosInfo item in macrosInfo) {
        string macrosDisplayValue = string.Format(MacrosTemplate, item.Alias);
        result = result.Replace(macrosDisplayValue, "");
      }
      return result;
    }

You can find an original method in MacrosHelperV2. After that, you would need to change the calls of the service from OOB service to your service in the action dashboard or email page. 

Like 0

Like

Share

0 comments
Show all comments
html
Macros
email templates
7.17

Hey,



I'm trying to implement business task when we need to send a datalist/table in email template.

I was surfing the academy and came into this https://community.creatio.com/questions/how-display-datalist-email-template 



But i faced a little problem,

When inserting my macros to email template, the message itself not recognizing the html code.



Any suggestions how to fix it? 

Thanks

Like 0

Like

6 comments
Best reply

Oleksii Protsiuk,

 

Hello,

 

&amp;lt; means that there should've been < in the code. I believe there is an issue with the html code translation in your template. You need to replace:

 

&amp;lt; with <

&amp;gt; with >

&amp;gt with > either

 

using Notepad++ replacement for example (I've modified the code you sent using this text editor). As a result I received a correct code, but after that the HTML should be checked. This can be done via the tests in Visual Studio and receivig the HTML code result and verifying it for example here. You can use some test values instead of entity.GetColumnValue(colPercentage.Name).ToString() to verify the code.

Dear Oleksii,

 

Thanks for reaching out.

 

Could you please provide us an example of macros you are trying to insert into your email template?

 

Thanks in advance. 

 

Best regards,

Anastasiia

Anastasiia Marushenko,

namespace Terrasoft.Configuration
{
	using System;
	using Terrasoft;
	using Terrasoft.Common;
	using Terrasoft.Core;
	using Terrasoft.Core.Entities;
	using Terrasoft.Core.DB;
	using Newtonsoft.Json;
 
	public class NewEmailMacros : IMacrosInvokable
    {
        public UserConnection UserConnection {
            get;
            set;
        }
        public string GetMacrosValue(object arguments) {
//        	var sjson = JsonConvert.SerializeObject(arguments);
//        	var templ = new {Key = String.Empty, Value = String.Empty};
        	var currencyId = "c1057119-53e6-df11-971b-001d60e938c6";
        	var esq = new EntitySchemaQuery(UserConnection.EntitySchemaManager, “Object"); 
            var colCode = esq.AddColumn("Column1"); 
            var colPercentage = esq.AddColumn("Column2"); 
            var colCurrency = esq.AddColumn("Column3");
            var colType = esq.AddColumn("Column4");
            var colDate = esq.AddColumn("Column5");
	        var colDay = esq.AddColumn("Column6"); 
          	var CurrencyFilter = esq.CreateFilterWithParameters(
    		FilterComparisonType.Equal, "Column3.Id", currencyId); 
	          esq.Filters.Add(CurrencyFilter);
           EntityCollection entities = esq.GetEntityCollection(UserConnection);
 var html = "&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Percentage&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;th&amp;gt;Code&amp;lt;/th&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Currency&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Type&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Date&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Day&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt";
            foreach (Entity entity in entities) {
 	          	html += "&amp;lt;tr&amp;gt;";
 	          	html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colPercentage.Name).ToString() + "&amp;lt;/td&amp;gt;";
            	html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colCode.Name).ToString() + "&amp;lt;/td&amp;gt;";
     	      	html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colCurrency.Name).ToString() + "&amp;lt;/td&amp;gt;";
      	     	html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colType.Name).ToString() + "&amp;lt;/td&amp;gt;";
         	  	html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colDate.Name).ToString() + "&amp;lt;/td&amp;gt;";
				html += "&amp;lt;td&amp;gt;" + entity.GetColumnValue(colDay.Name).ToString() + "&amp;lt;/td&amp;gt;";
            	html += "&amp;lt;/tr&amp;gt;";
            }
				html += "&amp;lt;/table&amp;gt;";
            	return html;
        }
    }
}

 

Anastasiia Marushenko,

I dont know why it kept changing the code, and adding the amp*

html += "&lt;/table&gt;";

 

 

Oleksii Protsiuk,

 

Hello,

 

&amp;lt; means that there should've been < in the code. I believe there is an issue with the html code translation in your template. You need to replace:

 

&amp;lt; with <

&amp;gt; with >

&amp;gt with > either

 

using Notepad++ replacement for example (I've modified the code you sent using this text editor). As a result I received a correct code, but after that the HTML should be checked. This can be done via the tests in Visual Studio and receivig the HTML code result and verifying it for example here. You can use some test values instead of entity.GetColumnValue(colPercentage.Name).ToString() to verify the code.

Oleg Drobina,

Thank you very much!

That helped.

You can use the Enhanced template macros for Creatio app from Marketplace.

You won't need to write additional code.

https://marketplace.creatio.com/app/enhanced-template-macros-creatio

Show all comments
email templates
formatting
custom
Macros
Studio_Creatio
7.18

Creatio Community,

 

Is it possible to format a custom macro field on an email template? I need to display a date with the long format date on an email (eg. August 25, 2022) 



The email definition that has the date looks like this:



The details of this fee were [#UsrPatientContactPreference.UsrEmailText#] to the patient or dispute submitter, on [#UsrRequestForAdditionalInformationSentOn#]



The  last field is the one I need to format.

 

Thanks,

Jose

Like 0

Like

1 comments
Best reply

Hi Jose,

 

Unfortunately, of now, there is no such functionality, but our R&D already has plans to implement it in future versions of Creatio!

 

As a workaround you can add a macro handler into the template:

https://academy.creatio.com/docs/developer/application_components/email…

Hi Jose,

 

Unfortunately, of now, there is no such functionality, but our R&D already has plans to implement it in future versions of Creatio!

 

As a workaround you can add a macro handler into the template:

https://academy.creatio.com/docs/developer/application_components/email…

Show all comments
BP
Email
Macros

Hi all,

 

I have a Email element in a business process that uses macros.

Made changes in the format of a date variable used in the email.

But, changes are not reflecting.

(Save, Publish, compile done)

 

Please advise.

 

Regards

Like 0

Like

1 comments

Hello Anitha,

 

Kindly contact our technical support team at support@creatio.com for us to take a closer look at the issue.

 

Thank you,

Anastasiia

Show all comments
email templates
Macros
Mergefields
Sales_Creatio
7.18

Hello,

 

How may I suppress merge fields in templates where there is no data. For example in the below, the Lead does not have data in Address 2.



Word reports easily accommodate this however, how may I handle this with email templates?

 

Using Studio/Sales vrs: 7.18.5.1500

Like 0

Like

8 comments

Hi Thomas,

 

Unfortunately, it is not possible to achieve this in the current version of the application.

We have a task for our R&D team to have an option to display an empty string instead of the macros code on the yellow background so it will be added in future updates.

 

Best regards,

Max.

Max,

Really disappointing that a basic problem like that that has been solved by other products for years was missed here. This can make using email templates completely unreliable.



Thanks for the reply. Is there a comprehensive list of what does not work and what is in the backlog on being worked on?

You are able to do it. Basically, you create two different blocks.

One showing the row with the Address and one without.



Then use Rules & Dynamic content to show the appropriate Block for every Contact.

 

Perhaps this method only'll work for Bulk and Campaign Emails. I'm note 100% sure. But you can try!

Julius,

 

I appreciate your creativity here. I believe that using dynamic content requires the Marketing Module which we have yet to implement.



Tom 

Try navigating to the Email Templates section under the Studio Workspace. Maybe you don't have the new Email Designer? Marketing licences may be required for this? What Creatio version do you use?

I think it'll work on 7.18.3 and newer

We use the latest cloud version, I created the templates in Studio but we do not have the marketing module. Dynamic content should work however, these are basic user follow up emails and this issue should not even exist in 2022. Our users will need to review and delete these empty fields which is inefficient and disappointing.

 

I appreciate your knowledge and assistance.

 

 Tom

Max,

 

Or anyone at Creatio who can help with this... clearly there is a function #deleteifempty# which is included in one of your base sample templates, "Template for new invoice approval notification (US)".



I need someone to explain how this works, I tried the code in HTML and it did not work, instructions please!!!



Thomas Colby,

 

Were you able to find a solution? we are having the same requirement with no success to how it can be achieved.

 

Thanks,

Show all comments
Email
Macros
Sales_Creatio
7.17

Hello community,

 

We have a use case where a lead owner needs to perform certain approval tasks. The task can be approved or rejected. Is it possible to send an email to that contact with approved, rejected buttons and store the result of whichever button the email recipient clicked in creatio?



 

Like 0

Like

2 comments

Hello Shivani,



Unfortunately, it is impossible to implement your business task, as for now.



But we have already registered the idea for our R&D team to implement this functionality in further releases. I will assign your case to this project in order to increase its priority.  



Best regards,

Bogdan

Bogdan,

Thank you Bogan. I was wondering if this could be replicated using OOTB Case feedback process which sends the satisfaction smilies. If we tried tot replicate this, would we require a SysPortal user license??

Show all comments
Discussion
Macros
email templates
template



It can be really great to have the possibilty to choose one field of one detail as a macro for one email template, currently we have to create a source code for any field for which we want to place in the email template.

4 comments

Dear Marvyn, 



Can you please provide us with more details on your idea? 

We would like to have a better understanding of functionality you would like to see in Creatio. 



Kind regards,

Roman

Roman Brown,

Of course, let's me explain the idea:

When we are creating an email template we have the possibilty to select basic or custom macro in order to personalize the email for each contact, but when we are selecting custom macro we don't have the possibility to select one detail (so one object) which is linked to the contact.

An example just below :

 

This is a free trial platform, and in this platform we have the contact in which we have some details like : Job Experience

 

 

And when we are creating an email template, and choose custom macro we don't see the detail (so the object with which this detail was created) and we don't have the possibilty to choose one field of this detail.

 

 

As you can see there aren't any possibilities to choose "Job experience" so this is this idea which i want to put the light on.

 

Thanks a lot Roman.

 

Hello Marvyn, 



Thank you for proposing this idea. 

We already have a similar request for extending this functionality in Creatio registered for the responsible R&D team. 

We will add this idea to their backlog so to increase it's priority. 



Kind regards,

Roman



 

Martin Büchler,

Good afternoon,

Unfortunately, the idea is still under development, we do not set a time frame for its implementation and start from their priority.

I raised the priority of the idea by adding your appeal to it, so this feature may appear faster in future versions.

Show all comments
word_printables
Macros
7.16

Hi Community,

 

I have a decimal field "UsrGrandTotal". I am showing this field in my word printable. How can I format the value of my field as  below:

 

Value: 2415.00

Must show as like this: 2,415.00

 

I found below link in academy but the problem is that, If the fractional part is zero, it will not be displayed. I need to show both the comma delimiter and the fractional 0 in 2 digits

https://academy.creatio.com/documents/technic-sdk/7-16/basic-macros-ms-…

Like 0

Like

3 comments

Dear Fulgen,

 

It’s possible to create a custom macros if there is no basic macros that would suit your business task. Please find the example of creating the custom macros in the article by the link below:

 

https://academy.creatio.com/documents/technic-sdk/7-16/how-create-macros-custom-report-word

 

Best regards,

Norton

I have an article with a sample here that is pretty close to what you're after, this custom macro will format money as $2,415.00 (based on the culture in the macro). You can see this article here https://customerfx.com/article/creating-custom-macros-to-format-values-in-word-printables-for-creatio-formerly-bpmonline/ You could use it as a starting point for yours and just replace the line

result = currency.ToString("C", new CultureInfo("en-US"));

to something like this

result = number.Format("{0:n}");

Ryan

Ryan Farley,

 Thanks Ryan, helps a lot!

Show all comments
Macros
email templates
newline
7.16
Sales_Creatio_enterprise_edition

I have some strings in email template, separated by Newlines:

Text1
 
Text3

 

Depending on a condition, Text2 could be added between:

Text1
 
Text2
 
Text3

 

To achieve this, I add [#UsrText2#] custom macros field of type string:

Text1
 
[#UsrText2#]Text3

 

But I can't can't make [#UsrText2#] contain NewLine. So result is:

Text1
 
Text2Text3

 

Email is sent with business process automatically.

How could I add a Newline? Neither Environment.NewLine nor \r\n, \n work.

Text1 and Text3 could also be dependent on conditions, so I don't want multiple templates for different combination of conditions.

Like 0

Like

5 comments
Best reply

Amazing!

Solved with <br/>

 

Yes. You make different Blocks.

Then you show the Block that matches the recipients information.

One block is

Text1   [#UsrText2#] Text3

Next block is

Text1   Text2 Text3

Then you just set them up so either one or the other is used with conditions.

Dear Yuriy,

 

If this email is sent via business process it will be easier to just create several conditional flows based on record conditions and create a template for each condition. Since there is no option to set up dynamic HTML in the template this will be the best option.

 

Best regards,

Angela

Angela Reyes,

This is what I'm afraid of. We have a minimum of 2 conditions. They will give 4 different templates. If one more condition is added, there will be 8 templates and 8 flows. But we really need these lines separated by newline. Each optional string needs to have 2 Newlines. This is the desired result:

Text1
 
Text2(optional)
 
Text3
 
Text4(optional)
 
Text5

What I get currently:

Text1
 
Text2Text3
 
Text4Text5

 

Julius,

Thank you Julius, I didn't say, email is sent automatically with a business process.

Amazing!

Solved with <br/>

Show all comments