Hi,
I am trying for on clicking of save button in mini pages it have to go directly to pagev2 is there any change to go like that for all sections. If it will possible means Kindly help me.
Thanks in advance,
Harish
Like
Hi Harish,
Hope you are well.You can override save method instead of OnSaved (in OpportunityMiniPage) the following way:
save: function() {
this.callParent(arguments);
var elementUId = this.get("ProcessElementId");
if (elementUId) {
Terrasoft.ProcessModuleUtilities.tryShowProcessCard.call(this, {
procElUId: elementUId,
recordId: this.get("Id")
});
} else {
NetworkUtilities.openEntityPage(this.getOpenEntityPageConfig());
}
}
This code will directly take to pagev2 after clicking on save in mini page and you can fallow the same way in all the sections to over ride the save method.
Regards,
Praveen Kumar
According to the previous answer the changes will be applied only to the opportunity mini page. In order to apply the functionality to all mini pages please override the method save() in BaseMiniPage. This way all mini pages will inherit and obtain this functionality.
/**
* Parent: BaseEntityPage
*/
define("BaseMiniPage", ["BaseMiniPageResources", "sandbox", "NetworkUtilities", "RightUtilities",
"ProcessModuleUtilities", "SecurityUtilities", "CallExtendedMenu", "AlignableContainer",
"EmailExtendedMenu", "BaseExtendedMenu", "LinkedEntitiesExtendedMenu", "ConfigurationEnumsV2",
"EntityResponseValidationMixin", "EntityRelatedColumnsMixin", "ConfigurationItemGenerator",
"css!MiniPageViewGeneratorCSS", "css!BaseMiniPageCSS", "MaskHelper"
], function(resources, sandbox, NetworkUtilities, RightUtilities) {
return {
mixins: {
SecurityUtilitiesMixin: "Terrasoft.configuration.mixins.SecurityUtilitiesMixin",
CallExtendedMenu: "Terrasoft.configuration.mixins.CallExtendedMenu",
EmailExtendedMenu: "Terrasoft.configuration.mixins.EmailExtendedMenu",
LinkedEntitiesExtendedMenu: "Terrasoft.configuration.mixins.LinkedEntitiesExtendedMenu",
EntityResponseValidationMixin: "Terrasoft.configuration.mixins.EntityResponseValidationMixin",
EntityRelatedColumnsMixin: "Terrasoft.configuration.mixins.EntityRelatedColumnsMixin"
},
messages: { },
attributes: {},
properties: {
miniPageContainerBottomOffset: 20
},
methods: {
/**
* @inheritdoc Terrasoft.BaseEntityPage#save
* @override
*/
save: function() {
this.callParent(arguments);
var elementUId = this.get("ProcessElementId");
if (elementUId) {
Terrasoft.ProcessModuleUtilities.tryShowProcessCard.call(this, {
procElUId: elementUId,
recordId: this.get("Id")
});
} else {
NetworkUtilities.openEntityPage(this.getOpenEntityPageConfig());
}
}
},
diff: /**SCHEMA_DIFF*/[ ]/**SCHEMA_DIFF*/
};
});