We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Getting Undefined when closing custom disposal task

devanshsing
Tera Contributor

I Have created 2 custom disposal task now when I am closing it getting undefined.

2 REPLIES 2

Tanushree Maiti
Tera Patron

Hi @devanshsing ,

Check your  custom code in server side component on  disposal task table whether data validation has properly done or not.

 

Refer:https://www.servicenow.com/community/servicenow-ide-sdk-and-fluent/what-are-good-practice-to-handle-....

 

Also check your browser console, system log, if it is throwing any error. Share that.

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

SohamTipnis
Mega Sage

Hi @devanshsing,

 

What’s happening is when you click Close Complete, some custom logic you added (most likely in your Flow / Business Rule / UI Action) is trying to show a message… but it’s not passing any value. So instead of a proper message, ServiceNow just displays “undefined.

 

Just find where the message is being set and make sure it’s not empty.

Example fix:

gs.addInfoMessage("Task closed successfully");

 

Let me know if this works!!!!😉

 

If you find my answer useful, please mark it as Helpful and Correct. ‌‌‌‌‌‌‌‌‌😊


Regards,
Soham Tipnis
ServiceNow Developer ||  Technical Consultant
LinkedIn: www.linkedin.com/in/sohamtipnis10