Время создания
Filters

Hello Creatio Community,

I’m working on the Calls section in Freedom UI and need to filter the Contact lookup by the related ContactCareer -> Account link. On the FormPage, I have the following handler which works correctly:

{
  request: "crt.LoadDataRequest",
  handler: function(request, next) {
      if (request.dataSourceName !== "PDS_Contact_yzb6a3h_List_DS") {
          return next.handle(request);
      }
      var account = request.$context.attributes["PDS_Account_9l7yfn9"];
      if (account) {
          var filter = {
              filterType: 6,
              isEnabled: true,
              items: {
                  CustomFilter: {
                      filterType: 1,
                      isEnabled: true,
                      comparisonType: 3, // Equal
                      leftExpression: {
                          expressionType: 0, // SchemaColumn
                          columnPath: "[ContactCareer:Contact].Account"
                      },
                      rightExpression: {
                          expressionType: 2, // Parameter
                          parameter: {
                              dataValueType: 0, // GUID
                              value: account.value
                          }
                      }
                  }
              }
          };
          request.parameters.push({
              type: "filter",
              value: filter
          });
      }
      return next.handle(request);
  }
}

Now I need to apply exactly this filtering logic to a DataTable on the ListPage (editable grid), but I can’t get it to work.

Has anyone successfully implemented a similar filter for a Freedom UI ListPage DataTable?

Could you please share a code example or best practice?

Thank you in advance for any guidance or samples!

Like 0

Like

2 comments

Hi Віталій Поліщук ,

As far as I know, it's currently not possible to filter lookups using custom code on a Freedom UI list page .

Hello,
I think this question is similar that the one in the post
https://community.creatio.com/questions/how-filter-lookup-values-editable-list-freedom-ui. Please check the provided answer there.

Show all comments

Hello!

I am trying to update Case DCM to the correct one, but it reverts to the initial status for that DCM instead.

I have this code we used before, but is not working properly now.

Anyone have any idea how to achieve this?

const request = Ext.create("Terrasoft.ChangeToAppropriateDcmInstanceRequest", {
	entitySchemaName: this.entitySchemaName,
	recordId: recordObj.Id
,
	currentStageId: recordObj.StageId.value
});
request.execute(scope);
Like 0

Like

0 comments
Show all comments

Hello Community,

I'm working with a mini page in Creatio, and I need to refresh or update the parent (background) page after an action (like closing the mini page) is completed.

As shown in the image, after the Start Sync Process is completed, I'm closing the mini page using JavaScript. However, I also want the main page to refresh automatically.

I’m looking for the best approach or method to trigger a refresh of the parent page programmatically once the mini page action is completed.

Regards,
Ajay

Like 0

Like

2 comments

What action does the button trigger? Starts a process or calls a configuration service? You could send messges back from there to the UI and listen for those on the parent page. See https://customerfx.com/article/receiving-server-side-messages-in-a-creatio-freedom-ui-page/

If it's just all client-side things the button does, you could possibly make use of Javascript's broadcast channel API to send a message to the parent page code. See https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API

Ryan

Ryan Farley,

The button triggers a business process that runs in the background. 

I successfully used the JavaScript BroadcastChannel API to send a message from the mini page to the parent page. How can I now refresh the parent page upon receiving this message?

Show all comments

Hi,

Can we use clio utility to download package from cloud instance? I tried and its giving me an error - Object reference not set to an instance of an object

Like 0

Like

1 comments

Hello, 

Yes, you can connect a cloud site to Clio. Please refer to this post for instructions on how to connect: https://community.creatio.com/questions/cloud-sites-clio

However, please note that if you face any issues while using it, you should contact the developers on GitHub for assistance, since we do not provide support for this functionality.

Show all comments

Hi everybody, 

the task is to make activity's  "Result" and "Detailed result" fields required for competed "Status". The same trouble was discussed here. Without result indeed. Here's a kind of realization of the similar task. 

As I am not a great master of the Mobile app customization, some help will be welcomed. The problem was tried to be solved like this:

Terrasoft.sdk.Model.addBusinessRule("Activity", {
	name: "UsrResultByStatusRequirement",
	ruleType: Terrasoft.RuleTypes.Requirement,
	requireType : Terrasoft.RequirementTypes.Simple,
	events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],
	triggeredByColumns: ["Status"],
	conditionalColumns: [
		{name: "Status.Finish", value: true},
	],
	dependentColumnNames: ["Result"]
});

and also like this:

Terrasoft.sdk.Model.addBusinessRule("Activity", {
    name: "UsrResultByStatusRequirement",
    ruleType: Terrasoft.RuleTypes.Custom,
    triggeredByColumns: ["Status"], 
    events: [Terrasoft.BusinessRuleEvents.ValueChanged, Terrasoft.BusinessRuleEvents.Save],
    executeFn: function(record, rule, column, customData, callbackConfig) {
    	var isRequired;
		var status = record.get("Status");
        if (status && (status.get("Id") === Terrasoft.ActivityStatus.Finished || status.get("Id") === Terrasoft.ActivityStatus.Canceled)) isRequired = true;
        record.changeProperty("Result", {
            isValid: {
                value: isRequired,
                message: "Column must be filled in"
            }
        }); 
        Ext.callback(callbackConfig.success, callbackConfig.scope, [isRequired]);
    }
});

both don't work. This one works, but doesn't do what is needed

Terrasoft.sdk.Model.addBusinessRule("Activity", {
	name: "DetailedResultByStatusRequirement",
	ruleType: Terrasoft.RuleTypes.Requirement,
	triggeredByColumns: ["Result"]
 
});

Where's the problem please?

Like 0

Like

2 comments

Hi Dmitry, It's better to set default value of false for isRequired to avoid potential undefined issues.

Could you please share the error details?

Pavan Manne,

I'll try to debug it tomorrow, but as I understand, code has no errors :) 

Show all comments