0
votes

I am trying to have Copy/Paste functionality in Activities screen.I am not able to get the drop down to the clipboard where it shows options for copy and paste.

enter image description here

public class CRActivityMaintExtension : PXGraphExtension<PX.Objects.EP.CRActivityMaint>
{
    public PXCopyPasteAction<CRActivity> CopyPaste;
    public override void Initialize()
    {
        base.Initialize();
       CopyPaste.SetVisible(true);

    }
}
1
Not all screens allow for copy and paste. Are you trying to customize the page to add Copy/Paste? (assuming this is an existing page). More details should be provided in the question to better assist. - Brendan
Yes, I am trying to Customize the page to add Copy/Paste. I have edited the question providing the code - Prathyusha
The Clipboard icon gets added but the drop down for copy and paste options is not avaliable. - Prathyusha
I was able to get the button to look correct by overriding CanClipboardCopyPaste, however the actual values never paste to another activity. [PXOverride] public virtual bool CanClipboardCopyPaste(Func<bool> del) { return true; } - Brendan

1 Answers

0
votes

I was able to get the copy and paste working within the Activity pop up page using the following:

public class CRActivityMaintExtension : PXGraphExtension<PX.Objects.EP.CRActivityMaint>
{
    public PXCopyPasteAction<CRActivity> CopyPaste;

    [PXOverride]
    public virtual bool CanClipboardCopyPaste(Func<bool> del)
    {
        return true;
    }
}

The problem is the copy data appears to be lost after the pop up page is closed. This I am not able to resolve. Maybe a template might be what you are looking for so I at least wanted to post as an answer vs a comment for the example as far as I was able to get.