Question

PushHistoryState error when redirecting page from ActivityMiniPage

Hello,

I need to redirect a user to an Account edit page under certain conditions, after an activity is completed via the activity mini page. For this I used the OnSaved() event as indicated in the sample code, but I get the error below. How do I resolve this?

onSaved: function() {
	this.callParent(arguments);
	this.sandbox.publish("PushHistoryState", {hash: "CardModuleV2/AccountPageV2/edit/" + "f71a7d76-8ac6-46cb-ab7a-a8dae49471b4"});
},

core-base.js:704 user: Supervisor/7f3b869f-34f3-4f20-ab4d-7480a5fdf647

 file: http://localhost:50081/0/core/hash/ng-core/src/polyfills-es5.js?hash=cd…

 line: 1

 column: 83823

 message: Uncaught Terrasoft.UnsupportedTypeException: Message PushHistoryState is not defined in MiniPageModule (ViewModule_MiniPageListener_MiniPage_ActivityMiniPage) module 

 date: Tue May 23 2023 18:15:14 GMT-0500 (Central Daylight Time)

 stack: undefined

 

 

Like 0

Like

1 comments

Hello,

 

Try sending a custom sandbox message to MainHeaderSchema for example and call NetworkUtilities.openEntityPage (see it's usage in the basic code) upon receiveing this custom message. This should also open the edit page of account.

Show all comments