You need to sign in to do that
Don't have an account?
Show Hide Field
I have a picklist field called Account Category which I would like to make invisible on my pae layout under the scenario when user selcts the following to picklist fields with the show values
Account classification field = retail
Source market field = USA
Only once they have selected values for those two fields must the account category field appear on my screen under accoutns screen provided the populated values are not the ones above. I don't know any JAVA but I'm guessing this might be able to be done with JAVA? Can someone help me with the appropriate coding?
thank you
Account classification field = retail
Source market field = USA
Only once they have selected values for those two fields must the account category field appear on my screen under accoutns screen provided the populated values are not the ones above. I don't know any JAVA but I'm guessing this might be able to be done with JAVA? Can someone help me with the appropriate coding?
thank you
Hi Andrea,
If we can manage user in different profile so that only limited user groups can access this field. Or you can try using permission sets, if users from same profile need different access on same field.
Hope this will solve your problem, please select as best if your problem resolve, else let me know if you more insight on this.
Thanks,
Gaurav
All Answers
Are we using custom VF page or standard page.
Below link might helps you understanding how we can hide/show field on VF page:
https://developer.salesforce.com/forums/?id=906F000000098ZjIAI
Hope this will solve your problem, please let me know if you need more insight on this.
Thanks,
Gaurav
Email: gauravgarg.nmims@gmail.com
I'm not familiar too much with the techinical aspect of Visual Force. What is a Custom VisualForce page as opposed to a standard page?
If My Accounts Classification picklist value is equal to "Retail" and my Source Market field equals either"USA" or "Canada" then my Account Category field should not appear in my Account's page layout.
How would I write this? I do need to see this field on the page for all other account record combinations. On the main account page as well as in Edit mode to be clear.
thanks!
You can try this working code,
You can change your fields accordingly.
Please mark this as the best answer if this helps
Thanks for providing the proper details on the requriement.
First of all standard vf custom page
Standard pages are the one which will be handled by Salesforce team i.e. the Look, behaviour will be taken care by Standard Salesforce team and we can just add remove sections / fields / related list on the pages.
Custom Pages, we implement Custom pages basically known as VF pages. This will be build on Salesforce website only but we can customize using Javascript, Ajax, Jquery and many other web technologies.
According to your requirement hide / show of fields based on paritcular conditions, we need to go for Custom Page approach.
Please let me know when can we start working on this.
Thanks,
Gaurav
So therefore the code you provided abovce would not work for the Accounts screen? I've already started working on this which was why I was looking if anyone had any particular coding I can put into a VisualForce customized page. I have a feeling this may work with Java script except I don't know how to write Java.
Can you help me? Would you know the correct code I would need on the Customized VisualForce page? Do I also need , Apex?
Any coding you could provide with the nameso of the fields I wrote above would be greatly appreciated!!!
Thank youvery much in advance for your help!
Andrea
Please try below sample code for you help:
Visualforce sample page:
Controller to above VF page:
Let me know if you need more assistance on this.
Thanks,
Gaurav
Hi Andrea,
Please once try above logic, if that works as per the requirement. Further we can tweak the code with whatever requirement we have.
Thanks,
Gaurav
I have copy pasted your code both for visual Force page and Apex/Controller and I'm getting the errors in my screenshot. The only change I made was that I remove the "s" you had put in for my Account Classification field as the field doesn't contain an "s". Please see my errors below.
I have update some code, please try now.
Also, I have accepted you request in skype. If possbile, please response on the same.
Thanks,
Gaurav
Thank you for this and for accepting the Skype request. The Apex part is now good but I'm now getting the following error on the VisualForce page. Please note when you send back that my field is call Account_Classification__c which does not include an "s" on the word Account per my screenshot.
Great, apex worked. Please note updated vf page code. Hope this will also work for you.
Thanks,
Gaurav
Hi Andrea,
If we can manage user in different profile so that only limited user groups can access this field. Or you can try using permission sets, if users from same profile need different access on same field.
Hope this will solve your problem, please select as best if your problem resolve, else let me know if you more insight on this.
Thanks,
Gaurav
thank you for your help!