How to hide 'Review' and 'Modify' option to the particular user when workitem created.
book
Article ID: KB0082304
calendar_today
Updated On:
Description
The business requirement is, only approver(vp) can reject or approve the records and other users like marketing,qard,buyer,labelling can modify records.
Approver(vp) cannot modify records and other users cannot approve/reject records.
So we need to hide 'Modify' option for approver(vp) and 'Review' option for other users.
Issue/Introduction
Hide Review and Modify options depending upon the logged user when workitem created.
Resolution
-Create customInit.html file in 'Enterprise folder' under 'htmlprops',if it doesn't exist.
-Open that file and write below code:
<script type="text/javascript">
function customInit()
{
var ename=document.getElementById('ENTERPRISE_USER_NAME').value;
if(ename == 'marketing'|| ename == 'qard' || ename == 'buyer' || ename == 'labelling' || ename == 'vp')
{
if(ename == 'vp')
{
var divModify = document.getElementById('MAINPRODUCTEDITLINK');
divModify.style.display='none';
}
else
{
var divReview = document.getElementById('MAINREJECTIONEDITLINK');
divReview.style.display='none';
}
}
}
</script>
-save the above file and just refresh the page. It will automatically reflect the changes.
Note:
Using customInit.html we can customize the MDM UI.
Additional Information
MDM Boot Camp in that unit 19 record UI,Lab P Custom UI and Javascript tutorials
Feedback
thumb_up
Yes
thumb_down
No