Requirement:
From ERP we are getting Import status as 'SUCCEEDED','WARNING','ERROR','CANCELED' and we need to convert it to boolean status like true or false.
JS code:
function returnStatus(result) {
var inProgress;
if (['SUCCEEDED','WARNING','ERROR','CANCELED'].indexOf(result)==-1)
{
inProgress = "true";
}
else
{
inProgress="false"
}
return inProgress;
}
No comments:
Post a Comment