In the default Addresses expanded list, there is a column called "Full address" which combines all of the different parts of the contact address object into one, and cannot be edited directly, such as in the following screenshot.

I'm having trouble figuring out how this is implemented, as I would like to do something similar for another object. Any help would be appreciated, because I cannot seem to think of a search term that would pull up a relevant article on the subject.

 

Thanks in advance for any help!

Like 1

Like

4 comments
Best reply

That is implemented in BaseAddressEventListener. It’s basically an entity event listener class. See more about those here: https://customerfx.com/article/adding-code-to-listen-for-entity-events-in-creatio/

Ryan

That is implemented in BaseAddressEventListener. It’s basically an entity event listener class. See more about those here: https://customerfx.com/article/adding-code-to-listen-for-entity-events-in-creatio/

Ryan

Obviously, you can do that pretty easily with a process too. 

I imagine that I'll also have to code in the fact that it's non-editable?

That is just a rule at the object level

Ryan

Show all comments

Hi Community,

Can you provide a code snippet of how we can capture the delete event generated from an Editable List, from the parent Page?

Example:

 

We want to catch in the Opportunities_FormPage -> the deletion of a record in Opportunity Team Detail.

Regards,

Sasor

Like 0

Like

3 comments

Hi Community,

Any update regarding this scenario?

Sasori

Sasori,

You can fetch the event of deletion in a business process. Then you can do actions and if your object opportunity has live update set then the updates will appear as soon the business process has run.

 

Other option would be to add your own action in the list and handle all necessary changes in the page.

 

Franck

Hello!

There is a crt.DeleteRecordsRequest, you can add a custom handler for this request (handlers in schema metadata).

This request is called when the user tries to delete records from the row menu and bulk actions menu.
But it is called before user confirmation (modal window), and rights checking.

There are such properties in the payload: 

dataSourceName - data source name of list, for which request is called;
filters - filters for records deletion(passed when records deleted by bulk actions panel)

recordIds - record ids which should be deleted (passed when record deleted by clicking row menu delete button)

Example:


handlers: /**SCHEMA_HANDLERS*/[{
            request: "crt.DeleteRecordsRequest",
            handler: async (request, next) => {
                const dataSourceName = request.dataSourceName;
                const filters = request.filters;
                const recordIds = request.recordIds ;


                console.log(dataSourceName, filters, recordIds );
                return next?.handle(request);
            }
}]/**SCHEMA_HANDLERS*/,

Show all comments

Hello Creatio Community,

 

I am currently working on a page in Freedom UI which contains a detail. The detail's object resides in Classic UI. I need to apply field validation on this detail while performing inline editing within the Freedom UI.

 

Here's a brief overview of what I'm trying to achieve:

  1. The main page is in Freedom UI.
  2. The detail object is in Classic UI.
  3. I need to implement field validation on the detail during inline editing.

     

I've attempted a few approaches, but none seem to provide the desired results. Has anyone faced a similar challenge or can provide guidance on how to achieve this functionality?

Any help or pointers would be greatly appreciated.

 

Thank you!

Like 0

Like

1 comments

Hello Kumar,
Looks like this task is impossible for now because Freedom UI doesn't allow getting the value of one control (attribute) in the code of custom validator for another control.

We have this task registered on our R&D team and will get this possibility in future releases, please follow the updates.

Best regards, Anhelina!
 

Show all comments

Hello Creatio Community,

I can not add records in a custom detail added in the Account section.

When i Click the plus sign of the detail nothing happens.

From F12 i get a very generic issue (Can not read properties of undefined (reading ' toLowerCase'). How can i further debug/solve the issue ?

Thank you

Sasori

Like 0

Like

4 comments

Hello Sasori,

 

unfortunately, it is quite difficult to analyze the issue like as there might be too many different reasons for such an error.

 

I kindly recommend you creating a separate support case and our team will help resolving the problem you are facing.

 

Kind regards,

Gleb.

Thank you Gleb :)

I was having similar issues.  What I found out is it depends where the detail is at.  For example I was creating a detail around work history.. One of the default fields was contact.  If I entered any contact other than the employee I was looking at it wont show on that contact record.  There is a logical dependency there...  I took the contact component out and works fine....  @Sasori... that is My guess as to what you are running into.

Jason Miller,

Thank you very much Jason !

Show all comments

hello all,

is it possible to add an editable/free writeable table or list in the account section?

Like 0

Like

1 comments

Hello Jeremy, 

 

You can add the chart for the Account's section record, it will be available once the record page is opened. It can be done through the Section wizard same way as you add a new column, just choose the needed page element.  

Also, you can create a chart for the section here:

Inserting the chart in the list view of the standard section, however, will require additional development. 

 

Best regards,

Anastasiia

Show all comments

Hi Community,

 

On an Editable Section, I want to lock the Quantity Column when Status changes to In Stock. Is their any way I can do this?



I tried to use the Business Rules on Page but it seems that it doesn't work on Section.

Like 1

Like

2 comments

Unfortunately at the moment, Business Rules don't work with details with the editable section.

We have already registered a problem to fix it in future releases. I attached this case to increase its priority.  

Михайло Зеленюк,

 

Yes this is a very important ask, suddenly changes can be made that were not before.



Thanks,



Damien

Show all comments

 Hi community,

I'm trying to disable the columns of an editable detail to make them read only and I have read many articles about it, but I'm still having a problem that I can't fix.



I wrote this code in the GridDetail to disable the fields but I noticed that for some of the columns of the detail is not working.

getCellControlsConfig: function(entitySchemaColumn) {
    if (!entitySchemaColumn) {
        return;
    }
    var columnName = entitySchemaColumn.name;
    var enabled = (entitySchemaColumn.usageType !== this.Terrasoft.EntitySchemaColumnUsageType.None) &&
        !this.Ext.Array.contains(this.systemColumns, columnName);
    var config = {
        itemType: this.Terrasoft.ViewItemType.MODEL_ITEM,
        name: columnName,
        labelConfig: {visible: false},
        caption: entitySchemaColumn.caption,
        enabled: enabled
    };
    if (!this.values.IsEnabled) {
        config.enabled = false;
        //config.labelConfig.enabled = false;
        //this.set("Is"+columnName+"enabled", false);
    }
    if (entitySchemaColumn.dataValueType === this.Terrasoft.DataValueType.LOOKUP) {
        config.showValueAsLink = false;
    }
    if (entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.DATE_TIME &&
        entitySchemaColumn.dataValueType !== this.Terrasoft.DataValueType.BOOLEAN) {
        config.focused = {"bindTo": "Is" + columnName + "Focused"};
    }
    console.log(config);
    return config;
},

Debugging I have discovered that the detail adds to the labelConfig the property "enabled" which is binded to an attribute ("isProductenabled").

I tried to force the property writing it in the method and I also tried to set the attribute manually, but it's not working... do you have any idea?



Let me know.

Thanks in advance.



Best regards,

Luca

Like 0

Like

5 comments
Best reply

Luca Tavasanis,

While I was debugging I have noticed that the properties of the labelConfig that enabled some of the fields where added in the method: "applyBusinessRulesForActiveRow: function(id, gridLayoutItems)" and to fix the issue I just added this method in the client module.

You can lock the fields in the editable detail using business rules on the page for the detail, rather than in code. On the page for the detail, add a business rule to make the field not editable. Something like 

Condition: Boolean true = Boolean false (something that is never true)

Then: Make field editable (the condition is never true, so field is never editable)

The business rule will apply to the detail list and the fields will not be editable in the detail list.

Ryan

Hi Ryan,

I'm actually working with the BaseGridDetail so I can't lock it with a business rule... do you have any other idea?

 

Thanks anyway.

Luca

Luca Tavasanis,

IIRC to do it in code I usually do it like this (but unable to verify if this is correct at the moment)

getCellControlsConfig: function(entitySchemaColumn) {
    // get config from base 
    var config = this.callParent(arguments);
    var columnName = entitySchemaColumn.name;
 
    // if this is the column I want to disable
    if (columnName === "UsrMyColumn") {
        Ext.apply(config, {
            enabled: false
        });
    }
 
    return config;
}

Hopefully that gets you closer, of course, if you're wanting to disable all, you could just remove the if to check the column it's for.

Ryan

Ryan Farley,

I just tried what you suggested but unfortunately it's not working... it returns an error when I use this.callParent(arguments);.

Thank you anyway.



Luca

Luca Tavasanis,

While I was debugging I have noticed that the properties of the labelConfig that enabled some of the fields where added in the method: "applyBusinessRulesForActiveRow: function(id, gridLayoutItems)" and to fix the issue I just added this method in the client module.

Show all comments

Dear Community,

 

This article shows us how to create a detail with an editable list.

The next step for us is to add an option to open this record like how you can open a page in the City lookup: https://prnt.sc/x79h2l

How do we add this functionality? 

 

Thank you in advance!

 

Kind regards,

Yosef

Like 0

Like

3 comments
Best reply

Hello Yosef,

I have an article outlining how to do this here https://customerfx.com/article/adding-an-edit-button-to-the-selected-ro…

Hope this helps. 

Ryan

Hello Yosef,

I have an article outlining how to do this here https://customerfx.com/article/adding-an-edit-button-to-the-selected-ro…

Hope this helps. 

Ryan

Ryan Farley,

Works like a charm!

I do however recommend adding the following for consistency:

{
  "className": "Terrasoft.Button",
  "style": this.Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
  "tag": "edit",
  "markerValue": "edit",
  "imageConfig": {"bindTo": "Resources.Images.CardIcon"}
},

This way you get the same icon as the other details.

 

Kind regards,

Yosef

Yosef,

That is true, I do have that in the article as well (it's at the end of the article), however at the time I was doing this for a system where they wanted the "edit" action more obvious to users. However, for consistency with the rest of Creatio, I'd go the route of using the icon as well.

Glad it worked for you.

Ryan

Show all comments

Hi Community,

We are trying to add a inline editing/adding of data for a detail. With the academy link : https://academy.creatio.com/documents/technic-sdk/7-16/adding-detail-editable-list , was able to add the editable list. But the number of fields in the detail is more than 8.  As we can’t have a editable for tiles view.

 

Is there a way to add more column in "select fields to display" and How can I add horizontal to this "select fields to display" in the settings page?

 

Also, how to add horizontal scroll in the mail detail page to scroll and add content if there are more columns?

Like 3

Like

1 comments

Hello Amritha,

 

To add more columns to the "Columns setup" they should be added to the detail object directly and then they will become available in the "Columns setup". Starting from 7.16.4 horizontal scroll in the column setup is available out-of-the-box so please update your app to 7.16.4 to get needed functionality without additional development. As for adding the scroll to the main detail - I am not sure if it is possible since properties like "overflow-y" or "scroll-padding-top" are CSS properties that can be theoretically added to the grid wrap of the detail data grid, but it would be easier to use the "Show more" option at the bottom of the detail rather than developing custom CSS and connecting it as a separate module to the detail schema.

 

Best regards,

Oscar

Show all comments

I have been having issues changing the default behavior when adding a record from a detail with an editable list. After adding the “IsEditable” attribute to my detail schema, whenever I want to add a record from the detail page a new row is added rather than showing the edit page for adding a new record. Is there a way I change this behavior?

Like 1

Like

2 comments
Best reply

Daer Alex, 

 

You can override the method openCardByMode in the detail schema, forcing the detail to open the card instead of adding a row. You can see the original method in the BaseGridDetailV2 schema in the NUI package. 

 

Daer Alex, 

 

You can override the method openCardByMode in the detail schema, forcing the detail to open the card instead of adding a row. You can see the original method in the BaseGridDetailV2 schema in the NUI package. 

 

Dennis Hudson,

 Thank you I was able to override this method and it worked. For anyone  trying to do a similar thing here is the code I added to my detail schema.

 

openCardByMode: function() {
     const cardState = this.get("CardState");
     const editPageUId = this.get("EditPageUId");
     const primaryValueUId = this.get("PrimaryValueUId");
     this.openCard(cardState, editPageUId, primaryValueUId);    
}

 

I just removed the if else statement from the original method:

 

if (this.getIsEditable() && cardState !== enums.CardStateV2.EDIT) { 
    this.addRow(editPageUId);
} else {
    this.openCard(cardState, editPageUId, primaryValueUId);
}

 

Show all comments