Get Approval Status
- This topic has 2 replies, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Get Approval Status
Not sure if I am missing something, but is there a way to get the document approval status in DFFS? I have tried this, but it isn’t working.
alert(getFieldValue('_ModerationStatus'));
Thanks!
Unfortunately the _ModerationStatus field is not show in the form and therefore you cannot access it with getFieldValue, but must use a query to get the value. Here is and example you can use in your custom js:
var item = spjs.utility.getItemByID({
"listName": _spPageContextInfo.pageListId,
"id": spjs.dffs.data.thisItemID,
"viewFields": ["ID", "_ModerationStatus"]
});
alert(item._ModerationStatus);
Let me know how this works out.
Alexander
Thank you Alexander, that worked!