0

I have a requirement in which I should check from my sidebar VF page whether the enclosing primary tab is opened in edit mode or not. How can I check that?

Here the primary tab edit page is a VF page. I could see the URL for Edit and detail page the same in salesforce service console.

If the primary tab opened in edit mode I want to do some operation in the sidebar VF page.

1

You could use the event handling mechanisms in the console toolkit to do this. Since your edit page is a VF page you could use the toolkit fire a custom event like this when the edit page loads (alternatively, use a custom JS button to replace your Edit button on the detail page and fire this event from there)

sforce.console.fireEvent( 'MyCustomEditEvent', 'Some event message you send', (optional)callback:Function );

Then in your sidebar you have a listener like this

sforce.console.addEventListener( 'MyCustomEditEvent', eventListener:Function)

Then the eventListener function you specify does whatever handling you want the sidebar to do.

https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_fireevent.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.