How to resolve the issue Error: Cannot convert null to an object?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2021 12:53 AM
hello,
I am currently working on the Flow designer actions named Lookup Records.
I am trying to get values from a previous step and initializing it on the script step. Where the value from the table is null
currentAlertCorpName -> this value is taken from a table called Accounts. but the value is null
I want to use this null value on the script but i couldn't use as it throws an error Error: Cannot convert null to an object
var corpName= inputs.currentAlertCorpName; //Which is begin initialized like this in the script.
How can i convert this null to an object and use it in the script for if conditions?
- Labels:
-
Script Debugger
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2021 01:08 AM
In the Inputs section of your action, uncheck mandatory option if checked & change the field type to String. So that the field accepts the empty value. And later in your Script step you can glide record to table and get the record if the value is not empty.