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
sfdc007sfdc007 

Issue : populate the system fields in visualforce page

Hi,

I need help on the following requirement as follows,


I am having a owner field in my visualforce page which will display the owner where i am having a link called as [Change] which will prompt to change the user


eg :

Owner[Change]

now my req is i am having another picklist field in my VF Page called as "Account maintainence status "

i want that "Owner" field to be read only for all , and the [Change] link should be displayed only on changing my   "Account maintainence status "  in my VF Page

MY VF CODE :

<apex:outputField value="{!Account_Maintenance__c.OwnerId}">
<a href="/{!id}/a?retURL=/{!id}">[Change]</a>
</apex:outputField>


Help me how to acheive my requirement

Thanks in Advance

Best Answer chosen by sfdc007
Sagar PareekSagar Pareek
I guess you want to show the change link on specific value (field_value for instance) other wise this link will not be visible. I have used the style attribute for the a tag which will render the link only when the specific value is set in the field. 

<a href="/{!id}/a?retURL=/{!id}" style="display:{!IF(account.status__c='field_value',' ','none')}">[Change]</a>

 

All Answers

Sagar PareekSagar Pareek
I guess you want to show the change link on specific value (field_value for instance) other wise this link will not be visible. I have used the style attribute for the a tag which will render the link only when the specific value is set in the field. 

<a href="/{!id}/a?retURL=/{!id}" style="display:{!IF(account.status__c='field_value',' ','none')}">[Change]</a>

 
This was selected as the best answer
sfdc007sfdc007
Thanks Dude, It worked :)