Question

Navigate pages and have a close button

Hello,

I am trying to have a button send a user to another page. I know of these ways of achieving this listed here 

https://customerfx.com/article/programmatically-navigating-to-a-page-in…

none of these fulfill my needs though, because I need to have it navigate but also have a close button, so the user can easily close out of the record the code sent them too.

 

Like 0

Like

3 comments

Hello,

In case if you use the line like this 

this.sandbox.publish("PushHistoryState",{

                    hash:"CardModuleV2/ContactPageV2/edit/410006e1-ca4e-4502-a9ec-e54d922d2c00"

                });

the line will add a new item to historyState Stack. And it automatically provides you with opportunity to return to the origin page by using navigation arrow in the browser.  By pressing back arrow you will go to the previous element of historyState Stack it means to your page.

 

Regards,

Dean

Dean Parrett,

Hello Dean, 

Thank you for your response, but I am looking for a way that would put a close button on the section, and the close would take it back to the origin page.

Dear Tyler,

Here is the example of code for adding the button that would bring you back to the page:

 

diff: [

///

{

    "operation": "insert",

    "name": "BackButton",

    "parentName": "CasePageTimeZoneButtonContainer",//Change to target container name

    "propertyName": "items",

    "values": {

        "itemType": Terrasoft.ViewItemType.BUTTON,

        "caption": {

            "bindTo": "Resources.Strings.CancelButtonCaption"

        },

        "click": {"bindTo": "onBackButtonClick"},

        "style": Terrasoft.controls.ButtonEnums.style.GRAY,

        "classes": {"textClass": "case-time-zone-button-group"}

    }

}

 

Regards,

Dean

Show all comments