- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Hi All,
I have found this wherein the indexOf function return different results in different scenario. Please have a look at below scenarios:
Example 1 :
When the watch list is null on this record which I used. Then it returns this error.
Output:
Note : If you are trying to search something via indexOf function in some field and the field is null then it return this error and it doesnt run the code. Make sure when the field is blank always add the below lin in your code:
if(grcase2.watch_list != "")
Example 2:
When the watch list field contains 2 values then it works perfectly fine the same code. So its not the error in the code however indexOf works as expected in null vs not null field values.
Output:
I found this really helpful.
Hope it helps you as well.
I hope this article helpful. Please mark it as helpful and bookmark if you like it.
Regards,
Shamma Negi
- 1,057 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
