Status
Release Available |
Status |
Framework Name |
---|---|---|
3.9 |
Current |
TBC |
General
During a cross-sell from Solution A to Solution B, there should be separate Portals corresponding to each Solution and a user can switch between Portals as needed. This also allows data to pass between Portals when a user switches to another Portal.
In addition, "Solution A" should be aware of "Solution B" portal data and pass on the required values, so that Solution B can use the data passed either to populate the fields on it or perform any logic based on it.
Currently, the Portal flow contains a navigation structure, stages, and actors. With this release, the framework code supports storing multiple Navigation structures and their corresponding styles without overlapping each of them.
Note
-
As a good naming convention, always prefix all the actor names with a key specific to your project and this is a prerequisite for cross-portal navigation to work without any issues. For example, SMB_PersonalInfo/TO_PersonalInfo.
-
The "Save" functionality of the portal builder will save the config details of the current portal only.
Sowhile integrating the portals make sure the change done for the current portal is saved beforemoving to next portal.
To support the navigation between portals/Navigation structures, enhanced an existing config named "next". Before this enhancement "next" is of string data type, now it accepts an Object in the below format:
Note
-
"stageName" & "data" are optional.
-
If "stageName" is not mentioned then the default stage in the next Navigation structure will be loaded
-
If "data" is not mentioned, the next navigation structure has no data available for it to use from the current navigation structure.
"next": { "navName": "<Next Navigation Structure Name>", "stageName": "<stage Name within the next Navigation structure>", "data" : { "field1" : "value1", "field2" : "value2", ... } }
Example 187. Code JSON
"next": { "navName": "buttons_reorder_2", "stageName": "home", "data": { "global1": "$global.attr(nav1Global1);", "newAccountInfo": "$state(nav1HomeStageNewActor);" } }
If there are many actors within a portal, then the user has to pass all the other actor's objects within the respective actor handler in order to retrieve all other actor's data in the next portal. In the code JSON mentioned below, the "newAccountInfo"
and "newAccountInfo1"
are used as objects in the current actor.
Example 191. Code JSON
"handler": { "next": { "data": { "newAccountInfo": "$state(nav1HomeStageNewActor);", "newAccountInfo1": "$state(CurrencyCS);", "global1": "$global.attr(nav1Global1);" }, "stageName": "newStage", "navName": "buttons_reorder_2" } }
For record actions, to pass the data from one portal to another, the user needs to specify under record action handler with "$this;"
attribute.
Example 192. Code JSON
"handler": { "next": { "data": { "newAccountInfo10": "$this;", "newAccountInfo": "$state(nav1HomeStageNewActor);", "newAccountInfo1": "$state(CurrencyCS);", "global1": "$global.attr(nav1Global1);", "newAccountInfo4": "$state(SaveSample22);" }, "navName": "CL_Portal_Title" } }
When switching from one Portal to another, if some data is passed on then it can be used either to populate the fields on it or perform any logic based on it.
Access the field data using $interNav.attr(<fieldName>)
syntax.
To pre-populate a panel component(Nav2_account_actor) with some data from the previous Navigation Structure
Create an init Actor with an automatic button with the handler configured as below:
Note
After the configuration is all done, we can hide this init actor using CSS.
Example 195. Code JSON
"handler": { "assignments": [ { "field": "$state(Nav2_account_actor);", "value": "$interNav.attr(newAccountInfo);" } ] }
To pre-populate a detail-view component(My_Account)(which queries data from the backend) with some data from the previous Navigation Structure
Add "loaded" general Handler with the field level assignments as below:
Example 196. Code JSON
"assignments": [ { "field": "$state(My_Account).attr(AccountNumber);", "value": "$interNav.attr(newAccountInfo).attr(AccountNumber);" }, { "field": "$state(My_Account).attr(AnnualRevenue);", "value": "$interNav.attr(newAccountInfo).attr(AnnualRevenue);" }, { "field": "$state(My_Account).attr(Name);", "value": "$interNav.attr(newAccountInfo).attr(Name);" }, { "field": "$state(My_Account).attr(AccountSource);", "value": "$interNav.attr(newAccountInfo).attr(AccountSource);" } ]
For a panel to retrieve the data user has to create a init actor and fetch the value. In the code JSON mentioned below the Nav2_account_actor
is an actor name that fetches the data from newAccountInfo (an object from the previous portal).
Example 197. Code JSON
"handler": { "assignments": [ { "field": "$state(Nav2_account_actor);", "value": "$interNav.attr(newAccountInfo);" } ] }
For record actions, to fetch or use the data from the previous portal, the user needs to use the below configuration:
Example 198. Code JSON
"handler": { "assignments": [ { "field": "$this.attr(CheckboxAsSwitch__c);", "value": "$interNav.attr(newAccountInfo11).attr(CheckboxAsSwitch__c);" }, { "field": "$this.attr(CheckboxField__c);", "value": "$interNav.attr(newAccountInfo11).attr(CheckboxField__c);" } ] }