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

Is it possible to trigger process's signal from backend (C# code)? 

For example, I modify record of schema in C# code and I want process to become triggered when the record was modified.

I have tried to make it as shown on a picture but it didn`t work. It worked only if the record was changed from UI side.

I would be very appreciated for knowledgebase link concerning this question.

Thank you in advance.

Like 0

Like

3 comments

What does the C# code look like that you're using to trigger it?

Can you provide more details on your custom code since I've created a simple method in the Account object that modifies a contact in the process inside the Account object (using onInserted method):

var contactEntity = UserConnection.EntitySchemaManager.GetInstanceByName("Contact");
			var contactRecord = contactEntity.CreateEntity(UserConnection);
			contactRecord.FetchFromDB("Id", new Guid("9c4111d2-cbf1-49f2-8c2b-00c6a82547c0"));
			contactRecord.SetColumnValue("Name", "From the code");
			contactRecord.Save();

and it triggers the business process with the start signal that is executed when the Contact name is modified. Maybe your logic is not modifying the record in the manner that should trigger the business process.

UsrContactSaved - the process on Contact schema that triggers when Contact record is saved ContactUtilities.ChangeContactStatus - the method that should change Status on schema Contact (this method is scheduled by job)

UsrOnContactStatusChanged - the process that should be triggered when the Status field in Contact schema was changed (but it doesn`t trigger)

So, when UsrContactSaved process triggered, there is a code in it that schedule a job that must call ContactUtilities.ChangeContactStatus in 10 minutes. After 10 minutes triggers ContactUtilities.ChangeContactStatus method and it changes Status via method in C# code.

In conclusion, status changed but UsrOnContactStatusChanged didn`t work. Expected result: UsrOnContactStatusChanged has to be triggered after work of UsrChangeContactStatusProcess process.

Show all comments

We have cloned the Ext dev(with no internet access) from our internal dev env which is working, but now on external dev, i am not able to log in. 

Like 0

Like

2 comments

Hello Adil,

 

Please double-check all features that are enabled for the machine where IIS server is deployed (according to the Academy article here). Once done, please redeploy on-site application from scratch using clean binary files (which can be received from the support team at support@creatio.com).

It is as a must to use clean binary files (not those that can be provided by support in case you request database backup of some application to deploy it locally, but out-of-the-box files).

Also, please double-check the connection parameters to the database in connection. Since incorrect database connection parameters, the Strings config file can also lead to login issues.

And finally, please check if you haven't specified HTTPS as a redirect method for your application in IIS and if it was appropriately configured in the configuration files.

localhost cannot find ViewModule.aspx after login.

Show all comments

Hi,



Need to update an instance with redis installed on CentOS linux. We need to indicate the redis path in the install.xml file. On the linux server it is installed in the standard "dir /var/lib/redis " . So we added "var/lib/redis" or "/var/lib/redis" with no success.



 





There is no indication about "RedisPath"  in the update guide https://academy.creatio.com/docs/release/update-guide/update-guide and we are stuck on the naming convention that Creatio requires.



Any ideas ?



Thanks,



Damien

Like 0

Like

1 comments

Hello, Damien!

 

The following instructions can help you to chieve the result you are looking for: Installing updates

There is a part related to commenting on the field when Redis is deployed on another machine. 

Show all comments

Like 2

Like

3 comments
Best reply

Hello Ahmad,

Yes, I do this often with CSS. It takes a bit of playing in dev tools to find the correct element to apply the styles to. In the case where you have two details "DetailA" and "DetailB", the styles are typically like this (you'll need to find the element of the detail that has the class "added-detail" to apply these to): 

/* DetailA - apply to element with class .added-detail */
#AccountPageV2UsrSchema8Detail1c7637b0Container {
    display: inline-block;
    width: 45%;
    margin-right: 10px;
    vertical-align: top;
}
 
/* DetailB - apply to element with class .added-detail */
#AccountPageV2UsrSchema6Detail0235cca7Container {
    display: inline-block;
    width: 45%;
    vertical-align: top;
}

The end result looks something like this:

You can see more of how to add custom CSS to a page here: https://customerfx.com/article/adding-custom-css-style-sheets-in-bpmonl…

Ryan

Hello,

 

Thank you for your question! 

We are constantly improving our application and this has been made possible in Creatio freedom UI:

https://academy.creatio.com/docs/8-0/user/nocode_platform/set_up_the_ui…

 

Unfortunately, if you use version 7.х - this can be achieved only by means of additional development.

 

Best regards,

Anastasiia

Hello Ahmad,

Yes, I do this often with CSS. It takes a bit of playing in dev tools to find the correct element to apply the styles to. In the case where you have two details "DetailA" and "DetailB", the styles are typically like this (you'll need to find the element of the detail that has the class "added-detail" to apply these to): 

/* DetailA - apply to element with class .added-detail */
#AccountPageV2UsrSchema8Detail1c7637b0Container {
    display: inline-block;
    width: 45%;
    margin-right: 10px;
    vertical-align: top;
}
 
/* DetailB - apply to element with class .added-detail */
#AccountPageV2UsrSchema6Detail0235cca7Container {
    display: inline-block;
    width: 45%;
    vertical-align: top;
}

The end result looks something like this:

You can see more of how to add custom CSS to a page here: https://customerfx.com/article/adding-custom-css-style-sheets-in-bpmonl…

Ryan

Ryan Farley,

Thank you Ryan!!

Show all comments

Hello, how can i hide these two inputs in the minipage?

Like 0

Like

2 comments

Hello,

 

The method you've used is correct and in case the column is not removed from the minipage using this code after the page was refreshed it means that either these columns have a different name or the incorrect parent module was selected when replacing the module.

 

Best regards,

Oscar

Hi,

 

there is a syntax error: there should not be a comma at the end of the row with the "name" property (lines 9 and 13)

 

BR,

Robert

Show all comments

Hi Community,

 

I installed a clean 7.17.0 Oracle version and wanted to import a package from another environment. I tried several times to install it (deleting it, regenerating schemas, compiling, getting back to the VM Snapshot) and it doesn't work.

 

The installation log prints the following message for almost any of the package's objects (you can find here an example for the "Case" object) :

 

2022-03-28 16:31:20,550 Error occurred while saving schema database structure "Case" in package "". UId 00000000-0000-0000-0000-000000000000: Error "Invalid parameter binding

Parameter name: NEW" occurred when updating schema structure. SQL script text: "CREATE OR REPLACE TRIGGER "CREATIO"."TR117D32F98275453484111C6611BI"

BEFORE INSERT ON "Case" REFERENCING NEW AS New OLD AS Old

FOR EACH ROW

BEGIN

    IF (:NEW."Id" IS NULL) THEN

        :NEW."Id" := "tspkg_Utilities"."fn_CreateGuid"();

    END IF;

END "TR117D32F98275453484111C6611BI";"

 

Do you have an idea from where this issue can come from ? The base environment where I exported this specific package is working fine.

 

"Case" in package "". UId 00000000-0000-0000-0000-000000000000 --> This part seems really strange. It seems like it doesn't find the package where he must install the related object.

 

Thanks a lot for your help.

 

Best regards,

Jonathan

Like 0

Like

2 comments

Hello Jonathan,

 

Thank you for your Question. First of all, it would be useful to follow the basic checklist to be sure nothing is missed:

1) Versions of the exporter and importer environments should be the same. (In this case, both should be 7.17.0)

2) The product bundle should be the same (For example both should be Service Enterprise)

3) Check the Dependent packages. All of the dependent packages should exist in the final environment.



(More info regarding packages is available in the below article:

https://academy.creatio.com/docs/developer/development_tools/packages/p…)



If all of the above was checked and the issue still exists - there is one more thing that will be true only for specific Oracle versions.

ODAC v.12 support is planned as part of Oracle support for .Net Core in future Creatio versions.



Workaround - use ODAC v.11:

At the moment, we are seeing similar problems when using the 12th version of ODAC.

To solve the problems we recommend installing it on the 11th:

1) Remove ODAC v.12

2) Install ODAC v.11 x64 and test the case.

3) If the error persists, install ODAC version 11 x32, in the properties of the application pool setting "Enable 32-bit programs" to "true" and check the case.

 

Please perform the above actions and let me know the results.

 

Best Regards,

Dan

Denis Bidukha,

 

Thanks for your reply. I tried all of the steps listed above but nothing works.

 

When I try to use ODAC v.11, (64 or 32 bits) it prints that "OraOps12.dll" is missing and I can't even connect no more to the CRM.

 

The only way to make it work is with ODAC v.12. Although, when importing the package it does this "Invalid Paramteter binding" error...

 

Best regards,

Jonathan

Show all comments

Hi there,

I'm trying to UPLOAD a picture that I took from the camera of my Iphone, into the CRM.

Ideally, that picture would be connected to :

- an Account

- a Contact

- a custom list of competitors

- a description

 

How would you do that ?

 

Like 0

Like

0 comments
Show all comments

Hello,

There are fields that ONLY Admin users have the rights to modify.

 

Using a Business Rule, we can Identify WHO can Edit the field.

 

When I'm hardcoding the Email of the Admin...it works.

But If I try to use the Role (System Administrators)...it doesn't work.

 

Is this a limitation or something that is not properly configured in our roles ?

 

Like 0

Like

2 comments

Hello Francois,

 

As of now, the business rules don't work with roles. You can only use users instead of roles, but in this case, you'll have to create each business rule for each user. 

 

We already have a query registered for our responsible R&D team to implement the described functionality in the upcoming versions of the application. 

I will add this case to the query in order to increase its priority.

 

Best regards,

Anastasiia

 

Hello Francois,

 

The better way to achieve Your requirement is Object Permission settings (Use column permission). Have a look following printscreen as a example how to grand access to "All employees " to only read Account Name and for "System administrators" to read and edit.

https://ibb.co/n0TCVBP

 

Best regards,

Marcin

Show all comments

Hello everyone,

i got some trouble here and the message is :

Server Error in '/0' Application.
Instance of workspace item with type "Terrasoft.Configuration.TgAcceptanceCoverageAndObjectSchema" cannot be obtained from server metadata
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: Terrasoft.Common.NullOrEmptyException: Instance of workspace item with type "Terrasoft.Configuration.TgAcceptanceCoverageAndObjectSchema" cannot be obtained from server metadata
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
 
[NullOrEmptyException: Instance of workspace item with type "Terrasoft.Configuration.TgAcceptanceCoverageAndObjectSchema" cannot be obtained from server metadata]
   Terrasoft.Core.Entities.EntitySchemaManager.InitializeSchema(ISchemaManagerItem schemaManagerItem, Assembly assembly) +221
   Terrasoft.Core.SchemaManagerItem`1.get_Instance() +208
   Terrasoft.Core.Manager`2.GetInstanceByUId(Guid uid) +96
   Terrasoft.Configuration.ConfigurationSectionHelper.InnerGetEntitiesStructure(UserConnection userConnection, IEnumerable`1 entityNames) +4871
   Terrasoft.Configuration.ConfigurationSectionHelper.GetConfigurationStructuresScripts(UserConnection userConnection) +80
   Terrasoft.Configuration.ConfigurationSectionHelper.GetConfigurationScript(UserConnection userConnection) +202
   Terrasoft.WebApp.Nui.ViewModuleHelper.CreateModulesConfigScript(UserConnection userConnection, HttpResponseBase response) +160
   Terrasoft.WebApp.Nui.ViewModule.SetupModulesConfig() +76
   Terrasoft.WebApp.Nui.ViewModule.Page_Load(Object sender, EventArgs e) +171
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082

Do you have any idea guys for solve this error? thank you

Like 5

Like

0 comments
Show all comments