Announcements
Hi,
I have added one of the validation on validatefield method for ,but after modifying the tab I am getting the following error . Kindly help and see.
The code which I wrote -
case fieldNum(BssiPrmLeaseCharge, BssiPrmDirectCost): { if(this.BssiPRMASC842Type == BssiPRMASC842Type::OperatingLease) { if(this.BssiPRMDirectCostExpense == 0) { ret = checkFailed("Please fill the value of direct cost expense field"); //this. BssiPrmDirectCost = 0; } else if(this.BssiPRMUnamortizedDirectCost == 0) { ret = checkFailed("Please fill the value of unamortized direct cost field"); } break; } break; }
Hi all, I moved the code to modified field method and this resolved the problem.
please ensure you are checking the field (which has X,Y,Z values) in case condition statement and within the case you can include further sub conditions.
hope this helps
Hi Muthu,
The requirement is that for X,Y,Z leases the field should have field only if A,B,C accounts have values.
Great, can you please let me know your requirement to help better?
Thanks
Hi Hanshal,
The screenshot does not provide enough information. Since removing the code takes care of the error, can you scroll down in the call stack to check if it lists the validateField method? That should tell you which line of code is causing the issue.
Hi Muthu,
Yes after removing the code i am not getting any error. Can you suggest now, what to do?
Yes from validate field method
Hi Gunjan,
Here is the attached image of the call stack. Please have a look and check.
.
Hi Hanshal,
Could you please check the Call stack and check from where the "stop" method is being called? This way we could determine if what the issue is.
In this case have you customized a standard object or have you created a custom object from scratch?
Hi Muthu,
from where should i remove the custom code? from validate field?
André Arnaud de Cal...
293,998
Super User 2025 Season 1
Martin Dráb
232,850
Most Valuable Professional
nmaenpaa
101,158
Moderator