Hi, 

 

Any ideas why the code below is not working? I get an 'Object reference not set to an instance of an object.' here /0/DataService/json/SyncReply/SelectQuery 

I checked that the getUsersInRole function that I wrote is working. It returns an array of Contact Ids.

Thanks in advance,
Jose

{
    request: 'crt.LoadDataRequest',
    handler: async (request, next) => {
        if (request.dataSourceName === 'PageParameters_UsrLookupParameter1_13p73tg_List_DS') {
            var roleId = request.$context.attributes.PageParameters_UsrLookupParameter1_atde2dj?.value;
            var users = await UsrC2CUtilitiesV2.getUsersInRole(roleId);
            const usersFilter = new sdk.FilterGroup();
            await usersFilter.addSchemaColumnInFilterWithParameters(sdk.ComparisonType.Equal, "Id", users);                            
            request.parameters.push({
                type: "filter",
                value: usersFilter
            });
        }
        return await next?.handle(request);
    }
}

Like 0

Like

3 comments
Best reply

hi Jose,

try to use newFilter instead of usersFilter in the push

// workaround for filters required in Creatio 8.1.0 and older
const newFilter = Object.assign({}, usersFilter);
newFilter.items = usersFilter.items;

Hello,
Just on code alone, it is hard to tell what is the reason for the issue.
You need to do a debug and see at what moment the system cannot read the value.

hi Jose,

try to use newFilter instead of usersFilter in the push

// workaround for filters required in Creatio 8.1.0 and older
const newFilter = Object.assign({}, usersFilter);
newFilter.items = usersFilter.items;

Hi Stefano, 

That fixed my issue. 

Thanks!

Show all comments

Hello,

I want to color rows in a list page whose date has passed (Freedom UI).

I tried to add a css file to my list page. I followed this article, but I still have a problem. When I look at the page's inspect, I see that a line has been added with a link to the file I added (
I would appreciate help.

Thanks, Smadar

Like 0

Like

1 comments

Can you give more specifics? Is the CSS not being applied to the page?

As long as the steps in the article are followed it does load the CSS on the page. The CSS itself would determine whether or not it actually applies to any elements.
Ryan

Show all comments

I have encountered an unusual problem.

Task: On the main page, create a button that opens a custom module with a detail. There are entries in the details and a help field that takes the user to the "Case" page.

I created a custom module, extend from "Terrasoft.BaseSchemaModule" and "schemaName" and "entitySchemaName" to my schema and entity.

There are no problems with the display, but when I go from my module to the "Case" page and want to return:

1. The "Close" button is triggered only the second time

2. It returns me to the main page and not to my module.

I tried to open my custom module through the "sandbox.LoadModule" - the "Close" button started working immediately, but I still returned to the main page

 

 

Like 1

Like

1 comments

Hello Dmitrii,

It's not so apparent from the description where the problem exactly is. Could you please share two parts of the code:

1) the custom module;

2) how did you add the button on the page

Show all comments

On a form or a list, I would like to display a link to a document stored in the system (the user selects the document manually). The name of the document would appear on the screen and if you click on it, the document will open. I couldn't find a "document link" field type. How can I implement this in Creatio?

 

Best regards,

Tamas

Like 0

Like

1 comments

Create the attachment detail (within the section you want to display document links) as a new section. Then create a new string field and a business process which updates this field each time an attachment is created. Like below:

 

"https://my.creatio.com/0/rest/FileService/GetFile/36262394-3837-46a6-ba…"+[#Read PI Attachment.First item of resulting collection.Id#]

 

The first part is constant for each record with the ID appended on each record created.

 

This will then create the link you need to automatically open the document within the section list.

 

The ID (highlighted in yellow) relates to the specific UId of the object (which you can locate within advanced settings). The ID highlighted in Green is the unique attachment ID which is appended during BP update.

 

Show all comments

Hi;

I try to find out which processes in productuction environment has checkes tracing enabled.

I found IsTracing record in sysSchemaProperty but it has value False but in GUI checkbox is set.

is there any easy way to find tracing processes



Regards

Tomek Branicki

Like 0

Like

2 comments

Hello,

You can filter the Trace enabled processes you need in the Process Library. Example below:





Best regards,

Malika 

 

Malika,

Tkanks Malika

Show all comments

Hello,

 

Suppose we have the following code:



var fundId = this.get("FundId");



                    var esq = Ext.create("Terrasoft.EntitySchemaQuery", { rootSchemaName: "FundSchema" });

                    esq.addColumn("FundAmount");

                    esq.getEntity(fundId, function (result) {

                        if (result.success) {

                            var currentamount = result.entity.get("FundAmount");

// empty result.entity for some roles

    }

}

 

And we have two roles A and B.



When I tried with role A, the result.entity is empty.

When I tried with role B, the result.entity has object value inside.



Both has fundId loaded in value and should be getting the same result.entity object.



I am trying to find where might be the root cause that results to this.

 

May I know is there any place in creatio that configures only certain role is able to get the result.entity or is there any other way to find the solution or root cause of this like code sample etc?

 

Thanks for the help!

Like 0

Like

1 comments

Hello,

 

EntitySchemaQuery checks for access rights when retrieving data, so the issue is in the entity's set of access rights for roles A and B. You need to check if users from both roles have access to the object (object permissions) and the record (record permissions) for the record that is returned for one role but doesn't return for another.

Show all comments

Hello,

Is there a way to design radio buttons in a detail columns in freedom UI?

I wanted to implement a functionality  such that user can only select option from two columns (exists, not exists)

Any suggestions are really helpful.

 

Thanks

Gargeyi

Like 0

Like

1 comments

I installed an application(Freedom UI) from the other instance. Prior to installation, I ensured that the data binding was correctly set up to ensure the lookup is connected to the export application.



After installing the application on the new instance, the lookups are functioning properly. However, I am unable to make any changes, such as adding a color column or other columns in the lookups (Data model objects).



Please assist in this matter.

Like 1

Like

1 comments
Best reply

Hello,

 

After installing a package on another environment, it gets locked, and you cannot make changes there.

Currently, this is the expected behavior, as a delivery management process for packages exists.

 

Here's the article:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

In version 8.1.2, you can unlock the package to apply a hotfix:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Hello,

 

After installing a package on another environment, it gets locked, and you cannot make changes there.

Currently, this is the expected behavior, as a delivery management process for packages exists.

 

Here's the article:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

 

In version 8.1.2, you can unlock the package to apply a hotfix:

https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platfor…

Show all comments

In this post Anhelina refers in a comment to setting a global flag in a custom field change handler, and reading the value in a validator function.

 

How do I create a global flag that can be accessed in a validator function in a client module?

 

Thanks in advance,

Like 0

Like

2 comments

Hello Gareth,

My comment was as an idea of how it might work but not a solution. Unfortunately, we currently have no official way to implement such logic.

Let's wait for the new releases and read the updates on the Academy according to the new functionalities.

Anhelina,

I used browser sessionStorage in the end.

Show all comments

We have active directory which locks user account after 5 login attempts.

After user change password and his exchange account was added in crm, email listener try to consume mails and 5 times fail it because password in crm is not changed yet (user need to remove his account from crm before changing password).

Our listener is deployed in docker. How we can configure attempts to consume emails < 5 times?

Like 2

Like

2 comments
Best reply

Hi,

 

The values for 'attempts to consume emails' are in the SyncErrorHandler table under the RetryCount column. For example, you can reduce it to 3 times. This would be the most optimal value.

Also, please note that a RetryCount value that is too large or too small can lead to undesirable consequences regarding interaction with your mail server (for example, the mailbox will be disabled upon any negative response from the server). Therefore, we recommend changing this cautiously.

Hi,

 

The values for 'attempts to consume emails' are in the SyncErrorHandler table under the RetryCount column. For example, you can reduce it to 3 times. This would be the most optimal value.

Also, please note that a RetryCount value that is too large or too small can lead to undesirable consequences regarding interaction with your mail server (for example, the mailbox will be disabled upon any negative response from the server). Therefore, we recommend changing this cautiously.

Sergii Zhmurko,

mb you know concrete row what is responsible for my question in this table? We use exchange basic auth

Show all comments