How to fetch custom field values in a custom object in Salesforce using Visual Force and Javascript?

StackOverflow https://stackoverflow.com/questions/19399492

質問

I have created a custom object MyObj_c. Then I created a field MyField_c. Now I created a separate tab for this where I can input values for that field. I entered some values to store in a record.

Now I need to access the value of that field from a VisualForce page using JavsScript. How can I do that ???

When I tried <apex:outputField value="{!MyObj__c.MyField__c}" id="abcd"/>

I get the default value of that field, not the value stored in that record.

役に立ちましたか?

解決

Are you leveraging a standardController on your VF page? If you are using a custom controller, you will need to reference your record by variable name rather than the object API name.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top