0

After upgrading from 2017 R2 to 2019 R2, custom fields on a Project we have designated as PXCopyPasteHiddenFields are now being copied. I assume this has something to do with the change from using the normal Copy/Paste icon on a Project in 2017 to the Copy Project menu item on the Action menu. Shouldn't it still honor the PXCopyPasteHiddenFields attributes with the new action? It isn't. Unless there's a way around it, I'll probably have to add some code to override the Copy Project action to accomplish this.

Tony Lanzer
  • 281
  • 1
  • 15
  • I suggest filing a bug report on the Acumatica portal... – Gabriel Oct 23 '20 at 00:47
  • I did create a ticket with Acumatica. I also just tried to override the OnCopyPasteTasksInserted to workaround the problem, but for some reason I get a runtime error and it won’t call the overridden method… Attempt by method 'Wrapper.PX.Objects.PM.Cst_ProjectEntry.OnCopyPasteTasksInsertedGeneratedWrapper(PX.Objects.PM.ProjectEntry, PX.Objects.PM.ProjectEntry, System.Collections.Generic.Dictionary`2)' to access method 'Aktion.Royal.Acumatica.PublishTRGData.Graphs.ProjectEntry_Extension.OnCopyPasteTasksInserted(PX.Objects.PM.ProjectEntry, System.Collections.Generic.Dictionary`2)' failed. – Tony Lanzer Oct 23 '20 at 18:15
  • Acumatica next told me to override CopyPasteGetScript() instead. I tried this, but it doesn't get called. – Tony Lanzer Oct 23 '20 at 20:01
  • You’re missing an argument in your function — there’s ProjectEntry twice in the original function – Gabriel Oct 24 '20 at 12:13
  • @Gabriel, if you're referring to OnCopyPasteTasksInserted(), this is not true -- at least for version 19.213.0029 anyway. – Tony Lanzer Oct 26 '20 at 22:31
  • I ended up overriding the plain Copy() method instead and it works for me now. – Tony Lanzer Oct 26 '20 at 22:33
  • in your comment above I can clearly see a difference in the arguments of your override vs. the original function. The error message indicates the following arguments: PX.Objects.PM.ProjectEntry, PX.Objects.PM.ProjectEntry, System.Collections.Generic.Dictionary2) — ProjectEntry is there twice, and you only have it once in your override... – Gabriel Oct 27 '20 at 14:11
  • I understand your point @Gabriel, but when I view the Acumatica source, there is only the single parameter. Acumatica ended up telling me that my solution was the best way to go about it, so I kept my solution. – Tony Lanzer Nov 09 '20 at 04:54

0 Answers0