+ Start a Discussion
charleshowardcharleshoward 

Problem with sfdc.override and passing params between vf pages

We have overridden the View button on Assets with a VF page.  On the new Asset Detail VF page we included the Cases related list and the associated New button.  The Case New button is also overridden and goes through a VF page that acts as a routing controller and then on to a custom VF Parent Case page.  

 

(Asset:View) -step1-> [VF:AssetDetail] -step2-> (Case:New) -step3-> [VF:CaseRouting] -step4-> [VF:ParentCaseNew]

 

There is code in the controller for the ParentCaseNew screen to pull the Asset id from the url and automatically select the correct Asset in a data table with checkboxes.



If I initiate the process by clicking into an Asset from an Account or from a list of search results, then it doesn't auto-select the Asset when I get to the Parent Case screen even though the parameter for the AssetID is in the url.  

 

On the other hand, if I manually enter the url to view an Asset, or the system routes to the Asset page from another visualforce page, then I can click the New button and the ParentCaseNew screen selects the Asset correctly.

 

I've narrowed it down to the sfdc.override parameter being present in the url of the Asset Detail screen.  If I manually remove this parameter from the url for the Asset Detail page in the address bar and press enter to reload the page, then everything works from there.

 

I've also figured out that even though the url that gets returned in Step 4 doesn't include the sfdc.override parameter, SalesForce automatically sticks it onto the end if the original Asset page's url had it.

 

Does anyone have any idea why this would be causing a problem?  Any ideas how to fix it/work around it?

 

Here's the url for the Asset screen that doesn't work:

http://c.cs4.visual.force.com/apex/AssetDetailViewReplacement?id=02i50000000ngW6&sfdc.override=1

and the url for the version that works:

http://c.cs4.visual.force.com/apex/AssetDetailViewReplacement?id=02i50000000ngW6

 

The url that gets returned from the VF:CaseRouting page in step 4 is:

http://c.cs4.visual.force.com/apex/CasePage?core.apexpages.devmode.url=1&def_account_id=00130000003Z5aQ&def_asset_id=02i50000000ngW6&ent=null

&retUrl=/apex/AssetDetailViewReplacement%3Fid%3D02i50000000ngW6&save_new=null

 

and the url that ends up on the ParentCaseNew page is

http://c.cs4.visual.force.com/apex/CasePage?core.apexpages.devmode.url=1&def_account_id=00130000003Z5aQ&def_asset_id=02i50000000ngW6&ent=null

&retUrl=/apex/AssetDetailViewReplacement%3Fid%3D02i50000000ngW6&save_new=null&sfdc.override=1

 

Thanks for any help!

dannywadannywa

I have found this same behavior.  My situation is two custom objects with a master-detail relationship, but the effect is the same.  Depeneding on how you navigate to the page, the presence of the sfdc.override parameter in the URL interferes with route actions. 

 

I would think that two years later there should be some explanation of the purpose and genesis of this parameter.  

 

Anyone?

 

Charles, what was your resolution?