+ Start a Discussion
Praveen Kumar.ax1457Praveen Kumar.ax1457 

After installing the manage package, VF page is giving error

I have encountered with a typical issue in one of a visualforce page. This page is working fine in dev org and staging org. We have released a managed package from the staging org and after installing the package in a trial org, VF page is not working and throwing error :

 

 

“SObject row was retrieved via SOQL without querying the requested field navmnaI__Deal__c.navmnaI__Account__r”.

 

This VF page was working fine till the last release but stopped working now. I have contacted salesforce support (Case # 08055862) on 24/08 but not heard anything from them yet.

 

Please let me know, if somebody has faced the similiar problem and any workaround to solve this issue.

JarrettKuljisJarrettKuljis

Having the same issue.  Workaround is to add fields to the query on the standard controller.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_pages_standardcontroller.htm?SearchType=Stem&Highlight=addFields

 

Something like the following...

 

 List<String> af = new List<String>();

        if(!Test.isRunningTest()) {

        /*

        | Had to prevent test class from error: 

        |System.SObjectException: You cannot call addFields when the data is being passed into the controller by the caller.

        */    

        af.add('nameSpace__Customer__c');

        sc.addFields(af);

        }

        se = (nameSpace__Object__c)sc.getRecord();

 

Nirmal ChristopherNirmal Christopher
Use the apex repeat tag <apex:repeat value="{!navmnaI__Deal__c}" var="navmnaI__Deal__c">
<apex:outputfield value={!navmnaI__Deal__c.navmnaI__Account__r}
</apex:repeat>

no need to modify anyrhing in the controller it wil work like a charm. i got this issue because of the namespace used in the installed orgs for a managed package.

https://developer.salesforce.com/forums/ForumsMain?id=906F000000097NeIAI