- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 05:38 AM
I am receiving an error "Cannot read property length from undefined" in my custom workflow activity 'Create PDL'. I have simply created a custom activity under the exchange application,name 'Create PDL'.This activity is used in a catalog item workflow to create shared mailbox in the exchange server automatically.
Can you guys help me , how to eliminate this error and make the workflow run smoothly, at the same time create a shared mailbox in the exchange server.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 05:49 AM
Hi Abhijit,
so it means you are trying to get length from string or an array but that array or string is empty.
can you check on what length is applied?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2019 01:44 AM
Hi Abhijit,
you are trying to set the displayName in AD; but that value seems to be empty so hence rejected by powershell
try printing this value and check if it is empty or not
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2019 05:53 AM
Hi,
As mentioned by Ankur, "Cannot read property length from undefined" error occurs when a variable is defined but it does not have any value and you call in a method/property like "length" on it.
An easy fix would be check for variable on which you are using length and debug why it does not have any value on it.
Thanks