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
ramesh babu 114ramesh babu 114 

what is the use of system.assert in salesforce

what is the use of system.assert in salesforce
Suraj TripathiSuraj Tripathi
Hi ramesh,

1- Asserts that the specified condition is true. If it is not, a fatal error is returned that causes code execution to halt.
2-System.Assert accepts two parameters, one (mandatory) which is the condition to test for and the other a message (optional) to display should that condition be false.


If you want more details about system.assert then please find below link:
https://salesforce-parth.blogspot.in/2016/07/salesforce-systemassertmethods.html

Regards,
Suraj