Hi,
here is 2 ways:
1. Disable menubar (way disable menu item for specified role only):
- Go to Roles > Resources > Tabs;
- Check tabs that have possibility to open tickets (ex: Service Desk, Quick Profile);
- In every tab you need to check "Menu Bar" attribute and get form name that linked with current tab for specified role;
- Then modify that files (use form group folders if needed) and wrap <PDM_OBJECT> that includes <PDM_MACRO name=menuItem label="Copy" function="make_copy()"> with <PDM_IF 0>
<PDM_IF 0>
<PDM_OBJECT>
if ( typeof w.ahdframe._dtl == "object" &&
parseInt(w.cfgUserAuth) > 1 &&
( ( $ACCESS.FAC_cr >= 2 &&
typeof w.ahdframe.copy_from_cr != "undefined" ) ||
( $ACCESS.FAC_chg >= 2 &&
typeof w.ahdframe.copy_from_chg != "undefined" ) ||
( $ACCESS.FAC_iss >= 2 &&
typeof w.ahdframe.copy_from_iss != "undefined" ) ||
( $ACCESS.FAC_nr >= 2 &&
typeof w.ahdframe.copy_from_nr != "undefined" ) ) &&
w.ahdframeset.ahdframe._dtl.edit==false )
{
<PDM_MACRO name=menuItem label="Copy" function="make_copy()">
if( typeof w.ahdframe.copy_from_nr != "undefined" ) {
<PDM_MACRO name=menuItem label="Copy_(Including_All_Relationships)" function="ahdtop.popup_window('', 'MAKE_COPY', '', '', '', 'FACTORY=nr', 'PERSID='+ahdframe.argPersistentID, 'METHOD=make_asset_copy_w_relationships', 'KEEP.MAKE_COPY=1')">
}
}
</PDM_OBJECT>
</PDM_IF>
OR
- if you need to disable this feature only for Request and not for incidents, you can modify condition in this way:
if ( typeof w.ahdframe._dtl == "object" &&
w.ahdframe.requestType != "R" &&
parseInt(w.cfgUserAuth) > 1 &&
( ( $ACCESS.FAC_cr >= 2 &&
typeof w.ahdframe.copy_from_cr != "undefined" ) ||
( $ACCESS.FAC_chg >= 2 &&
typeof w.ahdframe.copy_from_chg != "undefined" ) ||
( $ACCESS.FAC_iss >= 2 &&
typeof w.ahdframe.copy_from_iss != "undefined" ) ||
( $ACCESS.FAC_nr >= 2 &&
typeof w.ahdframe.copy_from_nr != "undefined" ) ) &&
w.ahdframeset.ahdframe._dtl.edit==false )
2. Disable copy function:
- Open detail_cr.htmpl;
- Wrap function copy_from_cr() with /* */ (JavaScript comment signs);
Regards,
cdtj