function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mauricio.ramos@corpitalmauricio.ramos@corpital 

VF page action parameters issue

Hello ,

 

I am usinga VF page to override the Edit page of Opportunity but I want to be able to control which users can see it and which are rerouted to the standard edit page. To do this I added an If to the Action parameter of the VF page tag.

 

So in this example I would reroute spaniard users to the standard Edit page and everyone else to the VF page.

 

action= "{!if($User.Country <>'Spain', null, URLFOR($Action.Opportunity.Edit, Opportunity.id, null, true))}"

 

BUT I also need to recreate the functionality for the new Opportunity.

 

I wanted to do the same for the New Opportunity VF page, BUT, I have to call the "goToQuoteOverride" method in the same action tag. So I wrote the following (without succes):


action= "{!if($User.Country <>'Spain', goToQuoteOverride, URLFOR($Action.Opportunity.New, Opportunity.id, null, true))}"

 

I also tried to put parenthesis () but also did not work.

 


action= "{!if($User.Country <>'Spain', goToQuoteOverride(), URLFOR($Action.Opportunity.New Opportunity.id, null, true))}"

 

Any idea how to acomplish this???