You need to sign in to do that
Don't have an account?
Hari nadh babu Eluru
Fee field must not be blank
In this trigger apex, I want to give error when Fee_paid__c field must not be blank. We can throw the error as "Please enter amount"
I tried above code
Please suggest me how to implement the condition. Thank you !
I tried above code
trigger Not_Negative on Student__c (before insert) { for(Student__c x: trigger.new){ if(x.Fee_paid__c < 0 && !(isblank(x.Fee_paid__c))){ x.Fee_paid__c.adderror('Please enter amount'); } } }The above image contains error message that i had getting error
Please suggest me how to implement the condition. Thank you !
Try to replace the if condition with the below.
If this solution helps, Please mark it as best answer.
Thanks,
All Answers
Try to replace the if condition with the below.
If this solution helps, Please mark it as best answer.
Thanks,