Sim Task #7 - BR and Script Include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
I am trying to validate my task on Scripting in ServiceNow Primer course Task#7. I did validate my code as per guide many time but I don't see any issues but when I click on "Validate task" it says validation failed.
I see the output too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
hi @Alekhya_Pasa ,
issue may be a small configuration or naming mismatch rather than a problem with your overall logic.
1) JavaScript is case-sensitive.
i can see in your code - function logFormValues(str)
But your Business Rule appears to call: LogFormValues(property + ", " + current[property]);
Notice the capital L in the Business Rule.
Make the names identical. I recommend using lowercase l .
--> logFormValues(property + ", " + current[property]);
2) Your logs show successful output, so I don't want you to keep changing working code unnecessarily.
just check the Business Rule's When to run tab.
If this helped, mark it helpful and accept the solution.
Regards,
Tejas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
37m ago
Code seems to be OK.
In your script include API name , you have given a space . Remove it and try.
Update API name
from : global. logFormValues
To : global.logFormValues
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
