I am using custom Object, I need a warning message on Detail Page, Is there anyway?
-
2Have you tried this or this?– Mr.FrodoApr 29, 2016 at 4:58
-
salesforce.stackexchange.com/questions/23656/…– highfiveApr 29, 2016 at 5:05
-
2what do you consider a warning message ? when does it need to be displayed ? If you wouldn't have already accepted an answer this would probably get closed as too unclear. Please avoid that for your next questions.– Samuel De RyckeApr 29, 2016 at 7:51
2 Answers
You can do this by using the adderror function and trigger fired on after update for Example:-
trigger warning on Testwarning__c (before insert,after update) {
for(Testwarning__c tw : trigger.new)
{
if(tw.yourfield__c==null)
{
tw.addError('please insert the field');
}
}
}
(you can also do this by validation rule for field specific error)
-
3Hi Ajay, Thanks for reply.... I am talking about warning message not error message, Error message stop the flow of Trigger execution Apr 29, 2016 at 5:38
-
Do you get the response on this ? If yes, could you please share the code ? Aug 10, 2017 at 17:16