Disable Copy Record

The ‘Copy Record’ contextual menu is the equivalent of using the Edit->Copy menu when the record is in the committed state. The Copy menu does not change name when copying an object or text or the whole record field values.

Today a colleague wanted to prevent the whole record from being copied both from the menu and the contextual menu, and I realised I didn’t have an answer to this.

Removing Copy using custom menus prevents all copying and custom menus don’t refresh all the time, hence entering a calculation in ‘Install When’ doesn’t work reliably.

Setting an access privilege to use Editing menus only doesn’t achieve this either.

The only way we’ve found to achieve this so far is to use custom menus, create a Custom Edit menu, replace the standard Copy menu item that is not based on an existing command, set the shortcut to Command/CTRL C and set Action to ‘Copy’ with [select] off as ‘Copy’ and ‘Copy Record/Request’ are separate commands within the options available.

Has anyone found a quicker way of doing this?

Thanks
Andy

A limitation to the above is that is prevents right click to copy text or an object, which is not ideal.

This is an evolving situation as we try other things. We’ve now managed to enable the right click copy, but only by reenabling ‘Based on existing command’ (which reenables copy record) and within Action run a script:

If [ IsEmpty ( Get ( ActiveFieldContents ) ) ]
     Show Custom Dialog [ “Message Title” ; “Copy Record is disabled” ]
Else
     Copy [ ]
End If

This allows standard and container field contents to be copied using the Edit menu, shortcut key and right click but prevents Copy Record.

Any simpler/more elegant solutions gratefully received.

I believe this is the first time I’ve posted without a single reaction.

Hasn’t anyone attempted to disable the layout right click Copy Record but still allow copying of (selected) field values? Copy Record will copy any hidden field values hidden using ‘Hide object when’ in the Inspector or within the grey developer area as well as.

Perhaps a small security issue?

imho this is critical, at least in some environments

If You set the user-privs ('available menues' or similar) to 'minimum', that user can not copy, contextual menu not available

But this means that there are fields that this role should copy, it has to be scripted...

Thanks Markus

I agree entirely, hence my original question. The scripting we’ve carried out above is the best we’ve been able to achieve so far.

I was wondering whether someone had a better solution.

The menu options are too restrictive and not a viable option unless you want to restrict all editing.

Kind regards

Andy

Yes... if You are on iPad with Go, You need some priv's - ie for printing

H i Andy
Sorry for replying late. This is one for the many issues of the FM client and the only way to prevent it is using custom menus, afak.
Cheers Torsten

1 Like