Question

How to make Detail appear as select window, instead of new Detail window?

Hi Team I'm trying to make a new Account detail appear as a multi-select lookup list, instead of opening a new detail window. Currently, when I click on (+) under Competitor Brands in Account, the detail opens in a detail display. However, I want a lookup select to simply open, such as when Products (+) is selected.

Like 0

Like

5 comments
Best reply

Hello Evan,

 

If I understand your requirement correctly then you can refer the following academy article,

https://academy.creatio.com/documents/technic-sdk/7-15/adding-multiple-…

 

Regards,

Sourav Kumar Samal

Hello Evan,

 

If I understand your requirement correctly then you can refer the following academy article,

https://academy.creatio.com/documents/technic-sdk/7-15/adding-multiple-…

 

Regards,

Sourav Kumar Samal

Hi Sourav Kumar Samal,

Thanks, that's very helpful.  I've implemented the LookupMultiAddMixin however and the modal dialog is appearing, but with no data!

I have inserted test data into my lookup, the issue I have is obviously in telling Creatio where to look.

 

Within the getMultiSelectLookupConfig, can you help with some advice on how to determine the correct schema and column names?

 

define("UsrSchemaf8875bd9Detail", ["LookupMultiAddMixin"], function() {
    return {
        mixins: {
            // Connecting the mixin to the schema.
            LookupMultiAddMixin: "Terrasoft.LookupMultiAddMixin"
        },
        methods: {
            // Overriding the base method for initializing the schema.
            init: function() {
                this.callParent(arguments);
                //Initializing the mixin.
                this.mixins.LookupMultiAddMixin.init.call(this);
            },
            // Overriding the base method for displaying the "Add" button.
            getAddRecordButtonVisible: function() {
                //Displaying the "add" button if the detail is maximized, even if the detail edit page is not implemented.
                return this.getToolsVisible();
            },
            // Overriding the base method.
            // The save event handler for the detail edit page.
            onCardSaved: function() {
                // Opens the window for multiple record selection.
                this.openLookupWithMultiSelect();
            },
            // Overriding the base method of adding a detail record.
            addRecord: function() {
                // Opens the window for multiple records selection.
                this.openLookupWithMultiSelect(true);
            },
            // A method that returns a window configuration object.
            getMultiSelectLookupConfig: function() {
                return {
                    // Root schema — [Opportunities].
                    rootEntitySchemaName: "Account",
                    // Root schema column.
                    rootColumnName: "Account",
                    // Connected schema — [UsrCompetitorBrands].
                    relatedEntitySchemaName: "UsrCompetitorBrands",
                    // Root schema column.
                    relatedColumnName: "UsrCompetitorBrands"
                };
            }
        }
    };
});

 

Evan Haklar,

 

I think getMultiSelectLookupConfig method is configured incorrectly, here in your case try with the following configuration,

getMultiSelectLookupConfig: function() {
                return {
                    // Root schema.
                    rootEntitySchemaName: "UsrCompetitorBrands",
                    // Root schema column.
                    rootColumnName: "UsrCompetitorBrands",
                    // Connected schema.
                    relatedEntitySchemaName: "Account",
                    // Root schema column.
                    relatedColumnName: "UsrAccount"
                };
            }

Let me know if this works for you.

 

Regards,

Sourav Kumar Samal

Hi Sourav Kumar Samal,

 

Thanks for your help.  Unfortunately it didn't work.  This actually causes the Multi Select lookup to display a list of Accounts, instead of a list of CompetitorBrands.  It's backwards to what we need.

 

 

It seems the order was correct previously, as the ROOT entity should be the Account (it appears under the Account object, and we want to associate the CompetitorBrandsInAccount by column Account) however just the definition of the SchemaName or ColumnName seems to be incorrect.

 

Have you any other suggestion?

Hi Sourav Kumar Samal,

 

I've sorted the issue!  Actually, I didn't declare the root entity column name correctly!  Once I did this, it's worked properly.

 

Show all comments