Sim Task #7 - BR and Script Include

Alekhya_Pasa
Giga Contributor

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.

Alekhya_Pasa_0-1793326191267.png

 

Alekhya_Pasa_1-1793326206360.png

 

Alekhya_Pasa_2-1793326231165.pngI see the output too.

1 REPLY 1

Tejas Adhalrao
Mega Sage

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