You need to sign in to do that
Don't have an account?

How to display message
I have created one custom object & there is one picklist Opt with two option- Yes & No.
My requirement is that I want to display “I like primary interest specifically secondary interest” if user selects ‘YES’ option in picklist.
If you are trying to display this alternative text on the detail page itself a good idea could be creating a formula field which would show the alternative text based on the option chosen by the user.
Hi,
To achieve the requirement there are two ways-
1. if you dont want customization, then create formula field with return type text as follow -
If( TEXT(API Name of picklist field )=="yes","I like primary interest specifically secondary interest","")
2. if you want customization ( apply css on text of message) then use inline visualforce page as follow
<apex:page standardController="API Name of object">
/***I am taking Account for example
<apex:page standardController="account">
<apex:form>
<apex:outputText styleClass="message" rendered="{account.API NAME OF PICKLIST FIELD=='yes'}" value="I like primary interest specifically secondary interest"></apex:outputText>
</apex:form>
</apex:page>
</apex:page>
Add this VF page in the layout of that object.
Thanks,
www.grazitti.com
Thanks for your reply but according to my requirment I am suppose to write trigger to to display message once I selects 'Yes' option in picklist.
Hey Prakhar,
If you need to write a trigger to show a message, then create a custom label and use it on Trigger,
I have writter blog on showing message on Standard Page using Label
http://abhithetechknight.blogspot.in/2013/09/custom-error-message-on-standard-edit.html
take a llok at it, hope this helps