Question

How to add mini page to Oppotunity Products

Hi

I want to add a mini page to products details in the opportunity edit page.

So, I have followed this tutorial for creating a mini page for adding records: https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-pop-summary-mini-page-adding-records

EntitySchemaName: "OpportunityProductInterest"

define("UsrOpportunityProductInterestMiniPage", [], function() {
	return {
		entitySchemaName: "OpportunityProductInterest",
		attributes: {
			"MiniPageModes": {
				"value": [
this.Terrasoft.ConfigurationEnums.CardOperation.VIEW,
this.Terrasoft.ConfigurationEnums.CardOperation.ADD
]
			}
		},
		diff: /**SCHEMA_DIFF*/[
			{
				"operation": "insert",
				"name": "Name",
				"parentName": "HeaderContainer",
				"propertyName": "items",
				"index": 0,
				"values": {
					"labelConfig": {
						"visible": false
					},
					"isMiniPageModelItem": true
				}
			}
		]/**SCHEMA_DIFF*/
	};
});

 

I have already executed the custom sql query, recompiled the workspace and added the HasOpportunityProductInterestMiniPageAddMode system setting.

Now, the [+] button on the products details doesn't work (no mini page or even the default page).

Any ideas how to acheive this behavior? 

Is it possible to create mini pages for details?

Thank you

 

Like 0

Like

5 comments

Dear Mohamed,

Unfortunately, it’s impossible to create a mini-page for detail. The article that you used to create a mini-page describe how to create a mini-page for section.

In order to return the default page, please remove the HasOpportunityProductInterestMiniPageAddMode system setting.

Best regards,

Norton

Norton Lingard,

Hi There,
How can I call a mini page using a custom button on the section.
Please reply.
Many Thanks.

Dear Akshit,

 

The functionality for opening mini-pages is implemented in the “MiniPageUtilities” mixin. In order to open a mini-page you should call the "prepareMiniPageOpenParameters" method from this mixin and pass to it a configuration object that contains settings for displaying the mini-page. Please see the example of the code below:

 

define("KnowledgeBaseSectionV2", ["MiniPageUtilities"], function(){

               return {

                              entitySchemaName: "KnowledgeBase",

                             

                              mixins: {

                                             MiniPageUtilitiesMixin: "Terrasoft.MiniPageUtilities"

                              },

                             

                              methods: {

                                             OpenMiniPage: function(){

                                                            var rowIdValue = this.get("ActiveRow");

                                                            var options = {

                                                                           rowId: rowIdValue,

                                                                           columnName: "Name",

                                                            };

                                                            this.prepareMiniPageOpenParameters(options);

                                             }

                              },

                             

                              diff: /**SCHEMA_DIFF*/[

            // Metadata for adding a custom button to a section.

            {

                // The operation of adding a component to the page is in progress..

                "operation": "insert",

                // The meta name of the parent container to which the button is added.

                "parentName": "ActionButtonsContainer",

                // The button is added to the parent component's collection.

                "propertyName": "items",

                // The meta-name of the button to be added.

                "name": "OpenMiniPageSectionButton",

                // Properties passed to the component's constructor.

                "values": {

                    // The type of the component to add is the button.

                    itemType: Terrasoft.ViewItemType.BUTTON,

                    // Bind the button header to the localizable string of the schema.

                    caption: "Open mini-page",

                    // Bind the button click handler method.

                    click: { bindTo: "OpenMiniPage" },

                    // Binding the button availability property.

                    //enabled: { bindTo: "isAccountPrimaryContactSet" },

                    // Setting the location of the button.

                    "layout": {

                        "column": 1,

                        "row": 6,

                        "colSpan": 1

                    }

                }

            }

        ]/**SCHEMA_DIFF*/

               };           

});

 

Best regards,

Norton

Norton Lingard,

Hi Norton,
Thanks It helps me a lot.
PFA the screenshots,

 

After selecting multiple records, when I clicked the update button a mini page appeared with fields [Name] and [Code], But It only edits the 2nd last selected record.

 

How to edit multiple selected existing records through the created custom mini page?

 

Many Thanks.

 

 

Dear Akshit,

 

Unfortunately, according to the out-of-the-box functionality a mini-page is designed to quickly view and add information about a single record. Therefore, it is not possible to edit multiple section records through the mini-page. You should edit only one record at a time. Please find more information about a mini-page in the article by the link below:

 

https://academy.creatio.com/documents/technic-sdk/7-15/mini-page

 

Please note that it is possible to edit multiple records using business-process. In order to do it you should firstly read a collection of records using the “Read data” element and then in the “Script task” element go through all elements of the collection and modify them. Please find additional information in the articles by the link below:

 

https://academy.creatio.com/documents/technic-bpms/7-15/read-data-process-element

 

https://academy.creatio.com/documents/technic-bpms/7-15/script-task-process-element

 

https://academy.creatio.com/documents/technic-sdk/7-15/main-classes-database-access

 

Best regards,

Norton

Show all comments