I'm looking for help with setting a default tab in a Freedom UI page.

I want the "Lead Info" tab (which is the first tab) to always be selected by default when opening a lead record. However, after I perform or complete an activity and return to the Lead page, it automatically opens the "Lead Activities" tab instead of the "Lead Info" tab.

Is there a way to set the page to always open the "Lead Info" tab, regardless of the last active tab or navigation history?

Like 0

Like

2 comments

You can set the active tab using something like this (where "Tabs" is the name of the tab control): 

request.$context.Tabs_SelectedTabIndex_Profile = 0;

I've not tried setting that in the crt.HandleViewModelInitRequest, but it could work - although might need to wrap in a setTimeout just to break out of the message loop and let the page load first and for the saved user profile for selected tab is loaded first (I don't believe there is a way to prevent that). Try something like this:

{
    request: "crt.HandleViewModelInitRequest",
    handler: async (request, next) => {
        setTimeout(() => { request.$context.Tabs_SelectedTabIndex_Profile = 0; }, 1000);
        return await next?.handle(request);
    }
}

Might need to play with the timeout interval (the 1000), although it's not 100% it will work.

Ryan

Try using this code in the  handler:

      {

      request: "crt.HandleViewModelInitRequest",

      handler: async (request, next) =>{

        request.$context.Tabs_SelectedTabIndex_Profile=0;

        return next?.handle(request);

      }

    }

Show all comments

Hi

 

I have tried adding hints that show up when hover over any tabs. I am getting error while doing so. Is there a way to add hints/tooltips over tabs?

 

Kindly advise

 

Thanks

Abinaya

Like 0

Like

1 comments

Hello Abinaya, 

 

Please, find detailed instructions on how to add pop-up hints in the Adding pop-up hints Academy article. 

 

Unfortunately, there is no basic option to add hints using standard Creatio tools, but the corresponding task is already registered for our R&D department. It will be implemented in further releases. 

 

Please, let us know in case any further information is required. 

 

Best regards, 

Olga. 

Show all comments

Hello Community,

 

I have a project where we have a decent amount of tabs per edit page. Many fields are labeled similarly due to the nature of the project. However, not all of them are required on a given page. I think it would make it easier for the users if there was a way to let them know in which tab they are missing a required value. I attach a picture describing what I mean. 

Thanks a lot for any recommendations!

Ignacio

 

 

File attachments
Like 1

Like

0 comments
Show all comments

We are going to release this feature via business rules in the next release.

2 comments

Hello Alfredo,

I have an article on showing/hiding tabs at runtime, this will show you how to show or hide the tabs. Basically, you'll need to wire up a change event for the lookup (See https://customerfx.com/article/triggering-an-event-when-a-field-is-chan…), then you can use the code in this article to show or hide the tabs as needed: https://customerfx.com/article/programmatically-selecting-showing-or-hi…

Ryan

The question was discussed in the community post by the link below. 

https://community.bpmonline.com/questions/how-showhide-tab-based-condition-74

 

 

Show all comments