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
prakashedlprakashedl 

Outputfield and Managed packages

I created a managed package 'pkg1' with namespace prefix say 'abc'. The package contains a custom object TestObjectMP__c. I installed the managed package in another org. I am not able to retrieve values from an obj that is part of managed package when i use outputfield. However, if i create a tab for that object ( that is part of managed package ) , i am able to view the values. Following is the code.

<apex:page standardController="abc__TestObjectMP__c" tabStyle="abc__TestObjectMP__c">
<apex:pageBlock >
<apex:pageBlockSection title="TestObject Information">

<apex:outputField value="{!abc__TestObjectMP__c.name}"/>
<apex:outputField value="{!abc__TestObjectMP__c.abc__TestText__c}"/>
<apex:outputField value="{!abc__TestObjectMP__c.abc__TestVal__c}"/>


</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

 Am i missing something simple here? Your suggestions will be very useful.

Message Edited by prakashedl on 01-26-2010 10:27 AM
Message Edited by prakashedl on 01-26-2010 10:28 AM
Best Answer chosen by Admin (Salesforce Developers) 
prakashedlprakashedl

Following solution provided by @A_Smith worked. Thanks a lot.

 


When you are loading the page inyour screenshot, you are not requesting that an object be loaded since youdidn’t supply a record Id.  The system doesn’t know what object todisplay. 

 

To request a record, you simplyneed to supply it’s ID: 

 

/apex/VF_Page?id=a00A0000001jzPj

Message Edited by prakashedl on 02-02-2010 01:27 PM

All Answers

A_SmithA_Smith
You shouldn't need a tab, although if you are going to use tabStyle in your code then I believe you will need a tab.  What happens if you delete the tab and remove tabstyle from your code?
prakashedlprakashedl

@A_Smith

 

Thank you for your suggestion. I deleted the tabstyle from the code and deleted the tab as well. I viewed the visualforce page as a system administrator. I have CRUD, view all, modify all permissions on this object. However, the data present  in the custom object doesn't seem to be fetched still.

 

 

A_SmithA_Smith
Can you post a screenshot with the URL and at least some of the page (don't need to see it all)?
prakashedlprakashedl
Sorry for a delayed response. I have the screenshots. But I am not sure, how do I attach them to this message. If I am not mistaken, I can upload images that are part of websites but not from your local drive. I also tried to find some help regarding this under "Help" , but in vain. It would be great, if you can point me to get it right
prakashedlprakashedl

Following solution provided by @A_Smith worked. Thanks a lot.

 


When you are loading the page inyour screenshot, you are not requesting that an object be loaded since youdidn’t supply a record Id.  The system doesn’t know what object todisplay. 

 

To request a record, you simplyneed to supply it’s ID: 

 

/apex/VF_Page?id=a00A0000001jzPj

Message Edited by prakashedl on 02-02-2010 01:27 PM
This was selected as the best answer