Blocking copy / Ctrl+C in a grid

I’ve hear that this request is often asked.

So there is a little piece of code to block all copy of data in a grid (for all form)

If you want to do this only on one form, you need to overwritte the method taks in the form

 

For my case, you need to select the method “task” on the class “SysSetupFormRun’ and write this:

FormControl form;
//standard code
if (_p1 == #taskCopy)
{
    form = this.control(this.selectedControl().containerId());
    if (form && form.handle() == classNum(FormGridControl))
    {
        //warning('Cannot copy on this grid!');
        return 0;
    }
}
ret = super(_p1);
return ret;

And for disable the copy on a specific field :

In the code I use this : this.selectedControl().containerId()
The method selectedControl return the fields on which we are, so you need simply use this : (with ItemName as fieldName from SalesTable form)

   if (_p1 == #taskCopy)
   {
       form = this.selectedControl();
       if (form.name() == 'ItemName')
       {
           //warning('Cannot copy this field!');
           return 0;
       }
   }

My original post : http://blogs.msdn.com/b/sebastien-petre/archive/2013/02/21/blocking-copy-ctrl-c-on-a-grid.aspx

AX 2012 and Office 365

Some of you would maybe know if AX 2012 is compatible with Office 365.

The answer is yes and no.

Yes you can use Word and Excel if the Office Add’on is installed and the software installed on the machine?

But there is some problems with Outlook. AX 2012 don’t support the TLS encryption which is mandatory when using Outlook.

 

More informations about Word and Excel here : http://blogs.msdn.com/b/chrisgarty/archive/2012/02/27/can-dynamics-ax-2012-work-with-office-365.aspx