I have set an encrypted string as a system setting as shown on the picture

 

and for some reason I am not able to use it as a value for the parameter of my user task. It is not showing as an option to be selected. Any help would be appreciated.

 

Like 1

Like

1 comments

Hello Erald,

 

By default, Business Process elements cannot process encrypted values but you can refer to this workaround that might help you with your business task.

 

Best regards,

Bogdan S.

Show all comments

Hi community,

 

I try to display (or not) an element based on information found on the contact page of the connected user. I tried with a business rule but I only can choose the user connected and not its related objects and their attributes.

 

So I tried something like that in the methods :

		methods: {
			init: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				// console.log(this.checkIfInHR());
				},
			/** 
			* Check if connected user is in HR department
			* @param  {string} departmentId  The contact's department Id
			* @param  {string} contactTypeId The contact's type Id
			* @return {bool} 			true if user is in HR department, otherwise false
			*/
			checkIfInHR: function(departmentId = "", contactTypeId = ""){
 
				// if called without args, query connected contact
				if (departmentId == "" && contactTypeId == ""){
					var esq = Ext.create("Terrasoft.EntitySchemaQuery", {rootSchemaName: "Contact"});
 
					// query the contact's department and contact's type
					esq.addColumn("Department");
					esq.addColumn("Type");
 
					// Execute the query 
					esq.getEntity(Terrasoft.SysValue.CURRENT_USER_CONTACT.value, function(res) {
						if (res.success){
							// call checkIfHR again but with args this time
							this.checkIfHR(res.entity.values.Department.value, res.entity.values.Type.value);
						}}, this);
				} else {
					// if args are passed
					// console.log() will be removed in prod
					console.log("departmentId : ", departmentId);
					console.log("contactTypeId : ", contactTypeId);
					console.log("response : ", departmentId == "ca611978-6277-4576-8a96-22ae54fe4d79" && contactTypeId == "60733efc-f36b-1410-a883-16d83cab0980");
					// 1st Id : HR department, 2nd Id: Our company
					return departmentId == "ca611978-6277-4576-8a96-22ae54fe4d79" && contactTypeId == "60733efc-f36b-1410-a883-16d83cab0980";
				}
			}
		}

Then I tried to call this method in the DIFF part :

			{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10,
				"enabled": this.checkIfInHR()
			},

but it always gives me this error now:

Uncaught TypeError: this.checkIfInHR is not a function

 

Do you have a better way to hide a tab based on values in the user connected' contact page or a way to fix my error ?

 

Best regards,

 

Julien G.

Like 0

Like

3 comments
Best reply

Hi Julien,

 

I cannot see the checkIfInHR method call on the init method execution, but I suppose you wanted to call it inside the "enabled" property of the Tab0f271a37TabLabel object. Ok, but the problem is that you need to use:

"enabled": {"bindTo": "checkIfInHR"},

and also the "enabled" property should be initialized inside the "values" object. So the code should've been:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.checkIfInHR();
				},
 
....
 
{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"enabled": {"bindTo": "checkIfInHR"},
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10
			},

The next problem is that this approach won't work since there is no "enabled" property for tab labels. So the general approach should be modified.

 

I would suggest using this check in the onEntityInitialized method:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.reformTabsCollection();
			},
			reformTabsCollection: function(){
				this.checkIfInHR();
				var tabsCollection = this.get("TabsCollection");
				if (this.get("BooleanAttribute")==false) {
                        tabsCollection.removeByKey("TheTabYouNeedToBeNotVisible");
                    }
			}

Also you need to create some bool attribute where the result of the checkIfInHR method will be written (using this.set("BooleanAttribute", true) or this.set("BooleanAttribute", false) at the end of the checkIfInHR method execution based on the checkIfInHR method results). There is no need to store the tab on the page in case it should be non clickable.

 

Best regards,

Oscar

Change it from this:

"enabled": this.checkIfInHR()

To this (and move inside of "values"):

"enabled": { "bindTo": "checkIfInHR" }

Ryan

Hi Julien,

 

I cannot see the checkIfInHR method call on the init method execution, but I suppose you wanted to call it inside the "enabled" property of the Tab0f271a37TabLabel object. Ok, but the problem is that you need to use:

"enabled": {"bindTo": "checkIfInHR"},

and also the "enabled" property should be initialized inside the "values" object. So the code should've been:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.checkIfInHR();
				},
 
....
 
{
				"operation": "insert",
				"name": "Tab0f271a37TabLabel",
				"values": {
					"enabled": {"bindTo": "checkIfInHR"},
					"caption": {
						"bindTo": "Resources.Strings.Tab0f271a37TabLabelTabCaption"
					},
					"items": [],
					"order": 11
				},
				"parentName": "Tabs",
				"propertyName": "tabs",
				"index": 10
			},

The next problem is that this approach won't work since there is no "enabled" property for tab labels. So the general approach should be modified.

 

I would suggest using this check in the onEntityInitialized method:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.mixins.MultiChoiceMixin.init.call(this, arguments);
				this.reformTabsCollection();
			},
			reformTabsCollection: function(){
				this.checkIfInHR();
				var tabsCollection = this.get("TabsCollection");
				if (this.get("BooleanAttribute")==false) {
                        tabsCollection.removeByKey("TheTabYouNeedToBeNotVisible");
                    }
			}

Also you need to create some bool attribute where the result of the checkIfInHR method will be written (using this.set("BooleanAttribute", true) or this.set("BooleanAttribute", false) at the end of the checkIfInHR method execution based on the checkIfInHR method results). There is no need to store the tab on the page in case it should be non clickable.

 

Best regards,

Oscar

Oscar Dylan,

 Thank you very much !

 

Best regards,

 

Julien

Show all comments

Hi Community,

 

In mobile, I found this sample below in Academy on how to add filter to dropdown field. My question is how to add mulitple filter to dropdown field. I tried below syntax but it is not working

 

addFilter: [

             {

                      property: "IsChief",

                     value: true

             },

             

             {

                      property: "IsChief2",

                     value: true

             },

]



 

Like 0

Like

1 comments

Hi Fulgen, 

 

Please try to use it in this way : 

 

addFilter: {

type: Terrasoft.FilterTypes.Group,

subfilters: [{...}, {...}]

}

 

Best Regards, 

 

Bogdan L.

Show all comments

Hi Everyone,



in mobile app, in the Account section,  we added a link to the order detail, which display the order list for that account.

Unfortunatelly, when selecting one order, the product list is missing.

 

I did not found a way to display it, using the mobile app assistant.

After some searching, i found that the MobileOrderRecordPageSettingsDefaultWorkplace define the fields to be displayed, but i could not configure it properly to display the product list.



How can it be done, please ?



Thanks.



Patrice

Like 0

Like

3 comments

Hello Patrice,

 

You need to add it to the mobile application manifest.

Find details here:

https://academy.creatio.com/docs/developer/mobile_development/mobile_ap…

 

Best Regards, 

Bogdan 

Hello Bogdan,

thank you for your answer.

The mobile application manifest is a part of the solution as one need to add OrderProduct reference in it to make it work.

 

For my particular issue, i did not set MobileOrderRecordPageSettingsDefaultWorkplace correctly.

Finally, i found the right way :

 

	{
		"operation": "insert",
		"name": "OrderProductDetail",
		"showForVisibleModule": true,
		"values": {
			"caption": "OrderProductDetailCaptionOrder_caption",
			"entitySchemaName": "OrderProduct",
			"filter": {
				"detailColumn": "Order",
				"masterColumn": "Id"
			},
			"operation": "insert"
		},
		"parentName": "settings",
		"propertyName": "details",
		"index": 1
	},

 

If anyone searching for the complete solution, here is the MobileOrderProductRecordPageSettingsDefaultWorkplace :

 

[
	{
		"operation": "insert",
		"name": "settings",
		"values": {
			"entitySchemaName": "OrderProduct",
			"details": [],
			"columnSets": [],
			"localizableStrings": {
				"primaryColumnSetOrderProduct_caption": "Informations générales"
			},
			"settingsType": "RecordPage",
			"operation": "insert"
		}
	},
	{
		"operation": "insert",
		"name": "primaryColumnSet",
		"values": {
			"items": [],
			"rows": 1,
			"entitySchemaName": "OrderProduct",
			"caption": "primaryColumnSetOrderProduct_caption",
			"position": 0,
			"operation": "insert"
		},
		"parentName": "settings",
		"propertyName": "columnSets",
		"index": 1
	},
	{
		"operation": "insert",
		"name": "Product_row_123",
		"values": {
			"row": 2,
			"content": "Nom du produit",
			"columnName": "Name",
			"dataValueType": 1,
			"operation": "insert"
		},
		"parentName": "primaryColumnSet",
		"propertyName": "items",
		"index": 2
	},
	{
		"operation": "insert",
		"name": "Quantity_row_123",
		"values": {
			"row": 3,
			"content": "Quantité",
			"columnName": "Quantity",
			"dataValueType": 1,
			"operation": "insert"
		},
		"parentName": "primaryColumnSet",
		"propertyName": "items",
		"index": 3
	},
	{
		"operation": "insert",
		"name": "Price_row_123",
		"values": {
			"row": 4,
			"content": "Prix de vente",
			"columnName": "Price",
			"dataValueType": 1,
			"operation": "insert"
		},
		"parentName": "primaryColumnSet",
		"propertyName": "items",
		"index": 4
	},
	{
		"operation": "insert",
		"name": "Discount_row_123",
		"values": {
			"row": 5,
			"content": "Réduction",
			"columnName": "DiscountAmount",
			"dataValueType": 1,
			"operation": "insert"
		},
		"parentName": "primaryColumnSet",
		"propertyName": "items",
		"index": 5
	},
	{
		"operation": "insert",
		"name": "Product_row_123",
		"values": {
			"row": 6,
			"content": "Détails du produit",
			"columnName": "Product",
			"dataValueType": 10,
			"operation": "insert"
		},
		"parentName": "primaryColumnSet",
		"propertyName": "items",
		"index": 6
	}
]



Best regards

Patrice

Patrice Vigouroux,

 

Hello, 

 

Many thanks for sharing your solution with us! :)

Please let us know in case of any additional questions. 

 

Best regards, 

Anastasiia

Show all comments

Hi,

In Order section there is a OOB lookups field called "Customer". On click we can select either Account or Contact because both list are appearing for selection.

I have a requirement to implement the similar functionality like combining multiple list into one lookup field.

Please help with the configurations.

Like 0

Like

2 comments
Best reply

Hi Janhavi,

 

You need to study how this lookup is implemented on the BaseOrderPageV2 schema and implement the same logic for your column. It's simple - create two lookup columns (UsrContact and UsrAccount that will point to the Contact and Account objects respectfully), add the following attribute to the section edit page schema:

"Client": {
					"caption": {"bindTo": "Resources.Strings.Client"},
					"dataValueType": this.Terrasoft.DataValueType.LOOKUP,
					"multiLookupColumns": ["UsrContact", "UsrAccount"],
					"isRequired": true
				},

Add the localizable string with the "Client" code and then insert this column somewhere on the page (I've been using the contact profile container as a parent):

{
					"operation": "insert",
					"parentName": "Header",
					"propertyName": "items",
					"name": "Client",
					"values": {
						"layout": {"column": 0, "row": 7, "colSpan": 24, "rowSpan": 1, "layoutName": "ProfileContainer"},
						"controlConfig": {
							"enableLeftIcon": true
						}
					}
				}

As a result you will get the needed lookup:

Best regards,

Oscar

Hi Janhavi,

 

You need to study how this lookup is implemented on the BaseOrderPageV2 schema and implement the same logic for your column. It's simple - create two lookup columns (UsrContact and UsrAccount that will point to the Contact and Account objects respectfully), add the following attribute to the section edit page schema:

"Client": {
					"caption": {"bindTo": "Resources.Strings.Client"},
					"dataValueType": this.Terrasoft.DataValueType.LOOKUP,
					"multiLookupColumns": ["UsrContact", "UsrAccount"],
					"isRequired": true
				},

Add the localizable string with the "Client" code and then insert this column somewhere on the page (I've been using the contact profile container as a parent):

{
					"operation": "insert",
					"parentName": "Header",
					"propertyName": "items",
					"name": "Client",
					"values": {
						"layout": {"column": 0, "row": 7, "colSpan": 24, "rowSpan": 1, "layoutName": "ProfileContainer"},
						"controlConfig": {
							"enableLeftIcon": true
						}
					}
				}

As a result you will get the needed lookup:

Best regards,

Oscar

Oscar Dylan,

It worked 

Thanks!

Show all comments

Hello Everyone.

I want to log in a separate file every communication with a Web-Service (request , response time etc).Is there any built-in , or tools from Marketplace to realize this task. Or I should customize the source -code.  

Like 0

Like

4 comments
Best reply

Petrika,

 

Perfect, then additionally you can use the same approach with EntitySchemaQuery, but create record is some section and then use the standard "Export to excel" functionality to get the file with request calls. So each time something is calling the GetErSumSq method you can create a record in some separate section (for example called "Integration call" and add information like DateTime.Now (to get the date and time when the method was called and which value was returned (sum))). Also you can try looking into the HttpContext, HttpContextAccessor and AppConnection to see which information is available there that can be used to additionally log the method call.

 

Best regards,

Oscar

Hi Petrika,

 

This should be done directly in the code of the 3rd party endpoint to which the call is performed (in case we are discussing the 3rd party webservice call from the business process). Logs of the integration call on the Creatio side are accessible only via standard IIS logs. Or you can enable the process tracing to see the status of the call.

 

In case the webservice is stored in the Creatio configuration (standard anonymous or regular webservice) then you can either add a part of inserting a record to some specific table in Creatio (via InsertQuery class for example) and retrieve data from there.

 

Best regards,

Oscar

Thank you very much for your immediate response Oscar. I have got an idea now.  This is what i am trying to do. I have created a button in the Front-End (Get Sum Ws) which calls in the Back-End a basic web service that caculates the sum of the AmountHC in Details Rows.

This is the code in the back-end

namespace test1323.Files.cs
{
    [EntityEventListener(SchemaName = "PetrikaExpenseReport")]
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    class DemoService : BaseService
    {
 
        [OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
 
        public decimal GetErSumSq(string name) 
        {
 
            EntitySchemaQuery entity = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "PetrikaExpenseReport"); 
 
            entity.AddColumn("Id");
            entity.AddColumn("PetrikaTotalAmount");
            entity.AddColumn("PetrikaName");
            entity.PrimaryQueryColumn.IsVisible = true;                                                                   
 
            IEntitySchemaQueryFilterItem parentfilter =
            entity.CreateFilterWithParameters(FilterComparisonType.Equal,"PetrikaName",name);
            entity.Filters.Add(parentfilter);                                                                            
            EntityCollection records = entity.GetEntityCollection(UserConnection);                                      
            Guid parentId = records[0].GetTypedColumnValue<Guid>("Id");
 
           EntitySchemaQuery rows = new EntitySchemaQuery(UserConnection.EntitySchemaManager, 
           "PetrikaExpenseReportLines");
 
            rows.AddColumn("PetrikaAmountHC");
            rows.AddColumn("PetrikaAmountFC");
            rows.AddColumn("Id");
 
            IEntitySchemaQueryFilterItem childfilter =
            rows.CreateFilterWithParameters(FilterComparisonType.Equal, "PetrikaExpenseReport", parentId);
            rows.Filters.Add(childfilter);                                                                            
            EntityCollection lines = rows.GetEntityCollection(UserConnection);
 
            decimal sum = decimal.Zero;
 
            foreach (var r in lines) 
            {
                sum = sum + r.GetTypedColumnValue<decimal>("PetrikaAmountHC");
            }
            records[0].SetColumnValue("PetrikaTotalAmount", sum);                                             
            records[0].Save();
            return sum;
        }
}
}

I want to log in a separate file every communication (request , response time etc) with GetErSumSq.

Petrika,

 

Perfect, then additionally you can use the same approach with EntitySchemaQuery, but create record is some section and then use the standard "Export to excel" functionality to get the file with request calls. So each time something is calling the GetErSumSq method you can create a record in some separate section (for example called "Integration call" and add information like DateTime.Now (to get the date and time when the method was called and which value was returned (sum))). Also you can try looking into the HttpContext, HttpContextAccessor and AppConnection to see which information is available there that can be used to additionally log the method call.

 

Best regards,

Oscar

Oleg Drobina,

Hi , I can't find the whole solution for logging a web service , it seems some comments have been missed or deleted , any ways , how can i log a web service in creatio ? 

Show all comments

Hi teams

Do you know the difference between TemplateText and TemplateBody in BulkEmail entity?

I'm trying to create a bulk email from a business process and I found these fields.

Like 0

Like

1 comments

Hi Everyone, 

 

I am trying to send emails with custom templates but the tool of the process designer won't show me my custom templates.

Anybody has any idea about the issue?

thank you in advance !☺

Like 1

Like

1 comments

Hello Federica,



Please contact our support team for further investigation: 

support@creatio.com

 

Best regards,

Bogdan

Show all comments

Hey,

 

I've created a new lookup using the Section Wizard and created a new table for it there as well but for some reason I can't find the table on the System Designer -> Lookups.

 

I tried searching for it by name and manually but it appears as if it doesn't exist although on the section itself you can see the lookup field and when editing the field you can see the table connected to it.

 

Any thoughts on how I can find this table?

Like 1

Like

3 comments

Hello, 

 

Please check whether you are adding a new lookup through the Section Wizard in a proper way. 

While adding a new lookup column to the page you can choose a "Data source": existing lookup or a new one.

You can proceed with creating a new lookup in a following way:

All the changes should be first saved through the Section Wizard, once done you can find a newly created lookup in Lookup section:

To be able to find the newly created lookup in the Configuration section, please check whether there are no additional filters:

 

Alternatively, you can first create a new lookup based on the need object and only after that proceed with adding a new lookup column to the needed section through the Section Wizard based on the already existing lookup.

 

Hope this clarifies!

Best regards,

Anastasiia 

 

 

I actually created it in the proper way thru the Section Wizard to avoid any complications but it appears to have created the object but not the lookup, so I went to lookups and created a new lookup using the created object (found it in the Configuration section).

 

So the problem is resolved :)

Edo Sagron,

 

Thank you for the update! 

Please do not hesitate to contact us in case of any additional questions. :)



Best regards,

Anastasiia 

Show all comments

Is there any way of increasing text/font size when Email is read on phone?

 

Can we change CSS on Emails such as in this example?

@media only screen and (max-width: 480px){
    .bodyContent{font-size:16px !important;}
}



https://templates.mailchimp.com/development/responsive-email/increasing…

 

Or can we use font sizes that are responsive? Such as vw, wh, 1vmin, 1vmax

https://css-tricks.com/viewport-sized-typography/

 

I have an old question about responsive image sizes which is sort of similar here:

https://community.creatio.com/ideas/image-sizing-email-designer

Like 0

Like

6 comments
Best reply

Julius,

 

We've analyzed your request and have some solution for you. Please check out all the steps to achieve such implementation:

 

1. When you just open the email designer, add "block" element and "HTML" element on this block.

2. Click settings (1) and apply "HTML design mode".

3. Here you click to the HTML block, then "Edit HTML" and you will see such document. I added my "div" with the message that will be sent. In my example it's "Hi all". 

 

Here is the code itself: 

div class="text-class"> Hi all</div> 

 

4. Also I added CSS style: 

 

Where (max-width: 480px) means that the style will be applied for devices with screen width less than or equal to 480px (here you need to check the particular width of the devises that will receive this emails and set it up to according to your business logic).

And I also created "text class", which is mentioned in the diff (p.3) ,where I applied "font-size: 40px;".

 

Here is the style code itself: 

 

<style media="screen and (max-width:480px)">.text-class { font-size: 40px;}</style>

 

Basically, thats all I added - one div and style for it.

 

5. As for result, in preview you may see the difference beetween the desktop and phone mode, the phone text is higher, as you wish:

 

You may also add any styles you want and change it for your requirements. 

 

 

P.S. Please also check this link, it might give you some additional tips of how to work with HTML in email templates: 

 

https://academy.creatio.com/docs/user/marketing_tools/email_marketing/e…

 

Hopefully it helps!

 

Best Regards, 

 

Bogdan L.

 

 

 

Hi Julius

 

You can test all this and wherever CSS is supported, be it a web or a mobile application, the styles will work. 

 

But resizing (for example, email) specifically for the web application open on the phone is impossible - 

it will in any case convert the text according to the telephone mode, like any other site.

 

Here as an example with email template, you can change as you wish by base tools: 

 

https://academy.creatio.com/docs/user/marketing_tools/email_marketing/e…

 

Also, if you are using Mobile App, you can modify it with custom CSS: 

 

https://community.creatio.com/articles/adding-custom-css-mobile-applica…

 

Best Regards, 

 

Bogdan L.

 

 

Hi Bogdan. I was unclear.

My goal is not to change the text size for Creatio users, but for the recipients of the email.

When the recipient opens the mail on phone, we'd like the text to be slightly larger.

https://prnt.sc/1yvw43e

Julius,

 

There is no such option in Creatio to change the text size for the third user.

 

Another user might use any kind of phone with a different operation system etc. 

 

So you might find some useful info in Google on how to increase this text for a particular group of users who received emails.

 

Best Regards, 

 

Bogdan L.

 

 

Julius,

 

We are double checking this question with our developer's team. 

 

I'll let you know if we have additional information.

 

Thanks!

 

Julius,

 

We've analyzed your request and have some solution for you. Please check out all the steps to achieve such implementation:

 

1. When you just open the email designer, add "block" element and "HTML" element on this block.

2. Click settings (1) and apply "HTML design mode".

3. Here you click to the HTML block, then "Edit HTML" and you will see such document. I added my "div" with the message that will be sent. In my example it's "Hi all". 

 

Here is the code itself: 

div class="text-class"> Hi all</div> 

 

4. Also I added CSS style: 

 

Where (max-width: 480px) means that the style will be applied for devices with screen width less than or equal to 480px (here you need to check the particular width of the devises that will receive this emails and set it up to according to your business logic).

And I also created "text class", which is mentioned in the diff (p.3) ,where I applied "font-size: 40px;".

 

Here is the style code itself: 

 

<style media="screen and (max-width:480px)">.text-class { font-size: 40px;}</style>

 

Basically, thats all I added - one div and style for it.

 

5. As for result, in preview you may see the difference beetween the desktop and phone mode, the phone text is higher, as you wish:

 

You may also add any styles you want and change it for your requirements. 

 

 

P.S. Please also check this link, it might give you some additional tips of how to work with HTML in email templates: 

 

https://academy.creatio.com/docs/user/marketing_tools/email_marketing/e…

 

Hopefully it helps!

 

Best Regards, 

 

Bogdan L.

 

 

 

Bogdan Lesyk, Thanks! Works really well! If you want to make this a featire in the Email designer -feel free to make this function into a suggestion. Thanks again!

Show all comments