2023-02-06 04:49 PM
I'm looking for custom code to disable or hide the menu item 'copy'. I do see several posts where others are looking for the same functionality. In my previous role, I do know that this was accomplished but I believe the code lived on the server, making it a platform-wide hide. Is anyone aware of how this might be accomplished? If not, is there custom code that will disable it in each app/questionnaire? I'm on 6.10.
Thank you in advance!
Jacqueline
2023-02-06 08:58 PM
Dont believe theres a way to do system wide (at least that I'm aware of, maybe if you're on-prem you can do special stuff). We just use a custom object in our apps we dont want users to ever copy from. This eliminates most scenarios of accidental copying, but users can still do it from reports.
I tried finding the post where I actually found this code, but the few that I managed to find about this all have something slightly different. We use:
<script type="text/javascript">
$('#master_btnCopy').hide();
$('.rmText:Contains("Copy")').closest('li').remove();
</script>
This removes the button both from the menu from clicking the ellipses and from right clicking the key field top left.
2023-02-07 06:15 AM
2023-02-10 01:28 PM
Thank you, Jordan. I did find this code and am able to hide those instances of copy while in the record. However, in a search result, you can right-click on the record number there to copy. Do you know of a way to handle this as well?
2023-02-12 05:39 PM
I'm not aware of any way to turn it off from a report/search sadly. I wouldn't think its possible on a hosted/SaaS environment. On Prem may be different but feel like you'd really need a bespoke solution. Only true solution is getting Archer to implement it themselves.
2023-02-13 09:20 AM
We add the following JavaScript to Record.aspx and Search.aspx to remove the detached context menu altogether.
$(document).ready(function () {
if ($('#master_DefaultContent_contextMenu_detached').length > 0)
{
$('#master_DefaultContent_contextMenu_detached').remove();
}
});