Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Programmatically updated Document status changing to Draft in DXP
Hi,
I have updated the existing document programmatically by the DLFileEntryLocalServiceUtil. Below is code.
DLFileEntryLocalServiceUtil.updateFileEntry(userId, fileEntryId,
title, mimeType, dxpFileTitle, title, "Draft to save",
true,
fileEntryTypeId, ddmFormValuesMap, file,
is, size, serviceContext);
But the document status is changing to Draft instead of Approved. Could you please suggest why the status changing to Draft?
I want to update document with the status Approved.
And tried to update the status like as below
DLFileEntryLocalServiceUtil.updateStatus(folder.getUserId(),dlFileEntry.getFileVersion().getFileVersionId(),workFlowStatus, serviceContext,new HashMap<String, Serializable>());
But the status is not changing and showing as Draft. Is there any way to update document with Approved status?.
Thanks
Kalai
Powered by Liferay™