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
Akanksha Dubey 7Akanksha Dubey 7 

Hi Guys I have a requirement to show a warning message on opportunity object if user tries to enter agreement start day earlier than today I can't use validation rule as I want to save the record Can anyone please share... Show More

These are the conditions I have to put agreement start date can't be earlier than today 
SUCHARITA MONDALSUCHARITA MONDAL

Hi Akansha,
You go with 'Alerts'. Create 'Alert' with VF page and embed it into Page Layout.

Check with below link
https://www.salesforcetutorial.com/alert-salesforce-standardcustom-object-page-layouts/

Thanks,
Sucharita

AbhishekAbhishek (Salesforce Developers) 
Hi,

Try the below code snippet

ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.ERROR, '<b> Any changes made to the quote will not flow to Magnys<b/>');

ApexPages.addMes(errMsg);

For your reference, you can check the below blog too,

https://developer.salesforce.com/forums/?id=906F00000008z5KIAQ

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.


Thanks.