Gravatar for

Question by Jim Lynch, Jan 17, 2017 4:30 PM

launch query when VisualForce page loaded

I'm sure this is an easy one to answer.

I currently have a page with several CoveoTabs. I want to remove all the tabs but still query launch a query that was associated with one of the tabs when the page is loaded. Basically, the goal is to create a separate VisualForce page for each tab since we are redesigning the Web site.

Here is one of the tabs.

              <a class="CoveoTab" data-id="Cases_WorkNotes" data-caption="Cases - Work Notes" 
                        data-expression='@syssource=("Salesforce - Cases - Worknotes") AND 
                                        (@objecttype=Case OR (@objecttype=WorkNotesC AND @sfworknotescpublishc==("1", "2")))'
                        data-icon="fa fa-briefcase"></a>

Basically, how do emulate the action of the CoveoTab ?

Thanks Jim

Gravatar for

Comment by gminero, Jan 17, 2017 4:51 PM

If I understand the behavior you would like correctly, when a user actually selects"something from your new landing/home page", he/she will be redirected to a new VF Page that will load the query for the tab instead of having the same page load the query in a new tab within the same VF page?

Gravatar for

Comment by Jim Lynch, Jan 17, 2017 5:07 PM

Yes. Our new home page will have several 'buttons', each replacing a CoveoTab. When the user clicks a button, we want to open a new browser tab/window and execute the query and process results in the new window. We also will have facets based upon the results. Make sense ?

1 Reply
Gravatar for

Answer by gminero, Jan 20, 2017 10:04 AM

I am wondering if it would be more convenient to simply re brand/design the “tab/header” and have display your "buttons", this would help avoid having to maintain multiple Visualforce pages. From your Index page, you would simply have to redirect towards the “tabbed page” with the search result.

In order to add a standalone searchbox you can refer to

Redesigning (adding images and changing the CSS style) of the tab should be much simpler.

Gravatar for

Comment by Jim Lynch, Jan 20, 2017 10:09 AM

Hi Guillaume

Currently, I followed your suggestion to hide the only tab i need. This is working well. Longer term we will be looking at Lightning Communities. But, for now, we are looking for a stop gap measure and your suggestion for hiding the tab works fine.

Thanks JIm

Ask a question