Hi Community,

 

I wanted to implement a funtionality where a validation should happen on click of Approve button. If the valiation fails the approval should not happen.

 

To achive the above task I tried with the following approaches, on the "UsrReturns" custom object.

  1. Tried to implement "asyncValidate" on "UsrReturnsVisaPageV2", but it didn't work (Seems the approval is happening outside the context of this page). Also not sure what is the use of this page.
  2. Tried to implement validation using Entity Events Layer on the object "UsrReturnsVisa". Although it didn't approve the request, but it didn't throw the exception as well with the following code,
    if(true){
    	throw new Exception("Can not approve");
    }
    return true;
  3. Tried to implement a custom approval logic using "ApprovalDashboardItemViewModel", but I can not create a replacing schema with this.

So need a way to implement such funtionality. Any suggestions will help.

 

Thanks & Regards,

Sourav Kumar Samal

Like 0

Like

3 comments

Hello,

 

Can you please screenshot the exact button you click, clicking which should start the validation process?

 

Thank you!

 

Best regards,

Oscar

Oscar Dylan,

While clicking Approve on notification panel as shown below,

 

 

Also while clicking under DCM & from Approvals section, same error shows on the console, but popup doesn't come.

 

Regards,

Sourav

Sourav Kumar Samal,

 

this is a bad request response returned by the app and we need to see the actual response (from the "Response" tab of the request in the "Network" tab).

 

To add some logic upon approval you need to replace the "approve" method in the "VisaNotificationsSchema" module (for "reject" actions its "reject" method). You will be in the context of the approval record and you can use data from there to process further with the approval\rejection. So you need to override the logic of these two methods.

 

Best regards,

Oscar

Show all comments

Hello Creatio Community,

Section wizard keeps reloading.

Printscreen below is from the Console:

What needs to be done to open the section wizard ?

Like 0

Like

1 comments

Hello Petrika,

 

This seems to be an issue that Creatio support should take a look at.

Please contact us at support@creatio.com

 

Thank you!

Show all comments

Hi,

I am trying to setup a simple test Marketing Email Campaign in Creatio. 

On starting the campaign, I noticed that the marketing emails sent to the audience do not get connected to the Contact/Account records. I want it to be recorded as an email activity so that it appears in the Timeline and History tab. Is there any way to achieve this?

Like 0

Like

3 comments

Hi Nirupama,

 

There is a detail on the contact page that shows trigger emails where a contact was in the audience. It's located on the "History" tab of the contact edit page and called "Email - Bulk emails" so you can track the connection there. Unfortunately for accounts its not possible to do since there is no obvious connection between an account and the trigger email (several contacts of the same account can be in the audience of a trigger email and if using a standard detail there will be duplicated records about the same trigger email, but probably the filtration of the detail can be modified to show distinct values, but this can lead to performance issues either in the server-side and on the client-side).

 

As for displaying a trigger email in the contact timeline: you can additionally create an activity using the "Add data" element of the campaign designer and connect the activity to the contact's account using an inbuilt function.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar, 



How about using this add-on? 

https://marketplace.creatio.com/template/marketing-record-types-timeline



Best Regards,

Jacek

 

Jacek Harlejczyk,

 

Hi Jacek,

 

Seems that it will fit Nirupama's needs perfectly. Thank you!

 

Best regards,

Oscar

Show all comments

Hello,

I have a section called Applications which has an Owner field that points to contact lookup. The application section also has a field that points to Company Lookup. I also have a Company section. Inside this section there is a detail called Workers to which contacts are added.

 

I want to filter Owner lookup to show contacts who are added to the Workers detail of the company which is mapped to the Application. Please see below image. Can someone help with the lookup filter?

 

Like 0

Like

3 comments
Best reply

Shivani Lakshman,

 

Change the filter from "[UsrWorkers.UsrWorker].UsrAccount.Id" to "[UsrWorkers:UsrWorker].UsrAccount.Id"

 

My bad, I forgot that in reverse join it work using ":", for example :

[EntityCode:FieldCode]

 

and not [EntityCode.FieldCode]

 

regards,

 

Julien

Hi Shivani,

 

To filter your lookup you need to add this attribute in the application page :

attributes: {
    "Owner": {
        "dataValueType": Terrasoft.DataValueType.LOOKUP,
        "lookupListConfig": {
            "filters": [function() {
                var filters = Ext.create("Terrasoft.FilterGroup");
                filters.add("WorkInThisCompany", 
                    Terrasoft.createColumnFilterWithParameter(
                        Terrasoft.ComparisonType.EQUAL,
                        "[Workers:Worker].Company.Id",
                        this.get("Company").value
                    )
                );
                return filters;
            }]
        }
    }
}

Replace "Workers" by the object code of the workers detail.

 

FYI :

here is the filter breakdown :

"[WorkerObjectCode:WorkerFieldCodeInWorkers].CompanyFieldInWorkers.Id"

 

Watch out that all the codes correspond to your environment, for example, the workers object code can be "UsrWorkers" or whatever you defined it. Check it out in the advanced settings.

 

Kind regards,

 

Julien

Julien Gunther,

Thank you for your response. I tried your code but received the error 

Collection item with name [UsrWorkers not found.

 

 request data: {"rootSchemaName":"Contact","operationType":0,"includeProcessExecutionData":true,"filters":{"items":{"searchFilter":{"items":{"1f59bb71-8f5d-45ed-b4eb...

 

Looks like the system is trying to reach UsrWorkers from Contact table. This is the case with my requirement. There is no direct relation between the 2 tables. Would appreciate any suggestion!

 

Here is the code I used

"UsrOwner": {
        "dataValueType": Terrasoft.DataValueType.LOOKUP,
        "lookupListConfig": {
            "filters": [function() {
                var filters = Ext.create("Terrasoft.FilterGroup");
                filters.add("WorkInThisCompany", 
                    Terrasoft.createColumnFilterWithParameter(
                        Terrasoft.ComparisonType.EQUAL,
                        "[UsrWorkers.UsrWorker].UsrAccount.Id",
                        this.get("UsrAccount").value
                    )
                );
                return filters;
            }]
        }

 

Shivani Lakshman,

 

Change the filter from "[UsrWorkers.UsrWorker].UsrAccount.Id" to "[UsrWorkers:UsrWorker].UsrAccount.Id"

 

My bad, I forgot that in reverse join it work using ":", for example :

[EntityCode:FieldCode]

 

and not [EntityCode.FieldCode]

 

regards,

 

Julien

Show all comments

Hello,

 

I have set up default filters on a section by following these links:



https://customerfx.com/article/programmatically-overriding-or-adding-fi…

https://community.creatio.com/questions/default-filter-section

 

Is there a way to filter records with folders in addition to the default filter made in getFilters?

 

Here is my getFilters method:

			getFilters: function() {
                var filters = this.callParent(arguments);
				filters.logicalOperation = this.Terrasoft.LogicalOperatorType.OR;
				filters.add("FilterByAM", this.Terrasoft.createColumnFilterWithParameter(
					this.Terrasoft.ComparisonType.EQUAL,
					"MQAccountManager.Id",
					Terrasoft.SysValue.CURRENT_USER_CONTACT.value
				));
				if (this.get("CanAssignAccountManager")) {
					filters.add("FilterByManager", this.Terrasoft.createColumnFilterWithParameter(
						this.Terrasoft.ComparisonType.EQUAL,
						"MQManager.Id",
						Terrasoft.SysValue.CURRENT_USER_CONTACT.value
					));
				}
            	return filters;
            }

Kind regards,

 

Julien

Like 0

Like

2 comments
Best reply

Hi Julien,

Yes, the filter from folders will get appended to the filters you set for the section. You just need to add your filters in a filter group so they are properly applied as a whole, in addition to the folder filters - rather than just add the filters individually to the filters returned from callParent. For example:

getFilters: function() {
    var filters = this.callParent(arguments);
 
    // now create a filter group for your filters
    var customFilters = Ext.create("Terrasoft.FilterGroup");
    customFilters.logicalOperation = Terrasoft.LogicalOperatorType.AND;
    customFilters.add("ActiveFilter", 
        Terrasoft.createColumnFilterWithParameter(
            Terrasoft.ComparisonType.EQUAL, "Active", true
        )
    );
    customFilters.add("NoWidgetFilter", 
        Terrasoft.createColumnFilterWithParameter(
            Terrasoft.ComparisonType.NOT_EQUAL, "Type.Name", "Widget"
        )
    );
 
    // now add your filter group to the filters that get returned
    filters.add(customFilters);
    return filters;
}

It does work without a filter group if you're just adding a single condition, however, in your code you're "OR"ing all your new conditions together with the folder conditions. Using a separate group keeps it all grouped with the same conditions and will work as expected.

Ryan

Hi Julien,

Yes, the filter from folders will get appended to the filters you set for the section. You just need to add your filters in a filter group so they are properly applied as a whole, in addition to the folder filters - rather than just add the filters individually to the filters returned from callParent. For example:

getFilters: function() {
    var filters = this.callParent(arguments);
 
    // now create a filter group for your filters
    var customFilters = Ext.create("Terrasoft.FilterGroup");
    customFilters.logicalOperation = Terrasoft.LogicalOperatorType.AND;
    customFilters.add("ActiveFilter", 
        Terrasoft.createColumnFilterWithParameter(
            Terrasoft.ComparisonType.EQUAL, "Active", true
        )
    );
    customFilters.add("NoWidgetFilter", 
        Terrasoft.createColumnFilterWithParameter(
            Terrasoft.ComparisonType.NOT_EQUAL, "Type.Name", "Widget"
        )
    );
 
    // now add your filter group to the filters that get returned
    filters.add(customFilters);
    return filters;
}

It does work without a filter group if you're just adding a single condition, however, in your code you're "OR"ing all your new conditions together with the folder conditions. Using a separate group keeps it all grouped with the same conditions and will work as expected.

Ryan

Thank you Ryan !

Show all comments

Hello,



I want to make a cascading dropdown. For example; user selects City, then County, then District, then Street... I want to fill the dropdowns from external web service whenever user selected previous dropdown.



How should i go about it?



Like 3

Like

3 comments

Hello Ensar,

Loos like you just need to add a filter to the column based on the other column value.

You can do it by adding attribute on the needed column.

For example:

"Transport": {
                "dataValueType": Terrasoft.DataValueType.LOOKUP,
                "lookupListConfig": {
                    "filters": [
                        function() {
                            var filterGroup = Ext.create("Terrasoft.FilterGroup");
                            filterGroup.add("WhatWeight",
                                Terrasoft.createColumnFilterWithParameter(
                                    Terrasoft.ComparisonType.GREATER,
                                    "[StTransport:Id].StMaxWeight",
                                    this.get("Weight")));
                            return filterGroup;
                        }
                    ]
                }

In this example we have column "Transport" and we wont to display values where their column "StMaxWeight" is greater that out column "Weight".

Thanks for your reply Dmytro Vovchenko,

 

Filtering is ok. At the same time, i need to get data from external web service not database. Is there a way binding lookups to external web service dynamically?

Not quite understand what are you trying to do but I think you can store the value from your web service in the schemas attribute and then work with it. To make it work you just need to somehow get the needed value from the web server in the schema code. 

Show all comments

Hello community,

 

I'm using isDetailEnabled method in client side to remove add button in detail based on specific conditions. For users in "System Administrator" role I want to allow the add button for every detail. 

 

 JSCODE:

isDetailEnabled: function(detailName) {
    			var esq =  Ext.create("Terrasoft.EntitySchemaQuery", {
						rootSchemaName: "SysUserInRole"
				});
				esq.addColumn("SysRole");
				// add filter for current user
				esq.filters.add("UserFilter", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysUser", Terrasoft.SysValue.CURRENT_USER.value
				));
				// add filter for role name, joining to SysRole (which is where the name is stored)
				esq.filters.add("RoleFilter", Terrasoft.createColumnFilterWithParameter(
					Terrasoft.ComparisonType.EQUAL, "SysRole.Id", "83a43ebc-f36b-1410-298d-001e8c82bcad" 
				));
               esq.getEntityCollection(function(result) {
                        if (result.success && result.collection.getItems().length > 0) {
                              return true;
                        }
                       return false;
               });
                return this.callParent(arguments);
}

 

Like 0

Like

1 comments

Since EntitySchemaQuery is asynchronous, it doesn't wait for the results to return before the isDetailEnabled function returns. You'll need to pre-fetch if the user is in the role (maybe in the init, or elsewhere) and save that result in an attribute or something, then just check the attribute from the isDetailEnabled function. Does that make sense?

Ryan

Show all comments

Hi there,

 

I made a button that call ProcessModuleUtilities on click. Once clicked, the callback is called and a BodyMask is shown but never hidden.

 

Here is the button :

			{
				"operation": "insert",
				"name": "GetAccountBtn",
				"parentName": "LeftContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {
						"bindTo": "Resources.Strings.GetAccount"
					},
					"click": {
						"bindTo": "onGetAccountClick"
					},
					"visible": {
						"bindTo": "getGetAccountButtonVisible"
					},
					"enabled": {
						"bindTo": "getGetAccountButtonEnable"
					},
					"style": "blue",
					"classes": {
                        "textClass": ["actions-button-margin-right"]
                    }
				}
			},

Here is the methods :

			onGetAccountClick: function() {
				Terrasoft.showConfirmation("Effectuer une demande pour devenir l'AM de ce compte ?", function(result) { 
    				if (result === Terrasoft.MessageBoxButtons.YES.returnCode) {
        				this.processGetAbandonAccountPopupResponse("RequestGetAccount");
    				}
				}, ["yes", "no"], this);
			},
			processGetAbandonAccountPopupResponse: function (processName) {
				args = {
					sysProcessName: processName,
					parameters: {
						accountId: this.get("Id"),
						userId: Terrasoft.SysValue.CURRENT_USER.value
					},
					callback: this.callbackShowRequestMade,
					scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
			},
			callbackShowRequestMade: function () {
				this.showInformationDialog("Votre demande a été effectuée.");
			},

Here is my business process :

And finally here is the result : https://vimeo.com/727290324/560dec0d61

 

I have this error in the console  :

XML Parsing Error: not well-formed Location: https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProce… Line Number 1, Column 1

 

Here is the request made by my browser :

POST https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProcess

Request body :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "accountId",
      "value": "b253a1de-10cd-452f-bd23-28ecb696b44a"
    },
    {
      "name": "userId",
      "value": "aa995be7-7611-43ea-a79d-19894080a976"
    }
  ],
  "schemaName": "RequestGetAccount",
  "resultParameterNames": []
}

Response body :

{
  "processId": "e3493a1e-0069-4164-81e1-47c7743146f0",
  "processStatus": 1,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Do you have any idea what can I do to fix this bodyMask issue ?

 

Kind regards,

 

Julien

Like 1

Like

2 comments
Best reply

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

Ryan Farley,

Thank you Ryan, I forgot this detail.

 

Julien

Show all comments

Hi Community,

 

We are creating email templates in DEV environment. In the DEV, we are adding link to object in the template and it works perfectly on DEV. But the issue comes when we migrate the changes to higher instances, it still shows the link to DEV.

 

How we can show the link for the same application from which the email is being sent? Really appreciate any suggestions.

 

Regards,

Sourav Kumar Samal

Like 1

Like

4 comments

Hello Sourav,

 

It seems that you are typing the whole link in the string value. Perhaps it would be suitable to replace them with macros and use Website Url (system setting for example) value to populate it. 

 

If your case does not allow you to use macros - please provide more details and screenshots along with step-by-step recreation of the misbehavior and a description of the expected behavior you want to achieve.

 

I hope this reply was helpful to you.

 

Best Regards,

Dan

Denis Bidukha,

 

We are using templates from Template section. We are using the link to object in the template as shown below,

 

 

Regards,

Sourav

Sourav Kumar Samal,

 

Unfortunately, the link to the object is absolute and not website-dependent. You should either modify it manually after migration or use the macros that was mentioned above. It is planned to change this in future versions, but there are no details available yet.

 

Best Regards,

Dan

Hi, is in the R&D plan to solve this?

Show all comments

Hello,



We have a requirement where the user should be able to Copy and paste images into the "Notes" field in the "Attachments and Notes" detail which is available out of the box. Request you to respond if anyone has implemented this before or is aware of the steps. 



Thankyou.

Like 1

Like

2 comments

Hello!

 

We've checked the information with a responsible R&D team, and there is no OOB functionality as of now. 

We already have a query registered for them to consider implementing such functionality in the upcoming application versions. I will assign your case to it to increase its priority.

Kalymbet Anastasia, Where is the values of the notes saved in the DB? which object to refer and in case if i need to copy the notes into another section notes? is it possible?

Show all comments