CA Service Management

 View Only
  • 1.  Adding Copy function to Right-Click Menu in Custom List Format

    Posted Jun 09, 2017 03:00 PM

    We're currently on SDM 14.1.02. We have created a custom table called z_translation.  We'd like to add the Copy function to the right-click menu on the list_z_translation.htmpl format.  I added the following below var cfgCanEdit = true; on the Source page as it is on the other list forms that have the Copy option:

    var cfgCanCopy = true;  //'Copy' entry in right click context menu of list page

    This has added the Copy option to the right-click menu, but if you try to use it you get the following error:

    AHD04416:Internal error: Unable to access data Unknown message

    Anyone know what I missed?



  • 2.  Re: Adding Copy function to Right-Click Menu in Custom List Format

    Posted Jun 11, 2017 01:43 PM

    Hi andholmes,

     

    When you enables the variable cfgCanCopy, SDM expects that in the factory of the list there is a method called make_ {factory} _copy where the variables to be copied are passed. You have to create the method and see what data you pass to the new one.

     

    The link https://communities.ca.com/thread/241748115 can help you to create method.

     

    Best Regards

    Francisco Avendaño



  • 3.  Re: Adding Copy function to Right-Click Menu in Custom List Format

    Posted Jun 12, 2017 10:52 AM

    One thing the link provided does not mention is if you have to create a new .spl file or if you should edit tmplcopy_site.spl.  If creating a new one, is there a specific naming convention I need to use for the .spl file and how do I call it?  I tried adding it to tmplcopy_site.spl and I still get the same error.  I also tried creating my own named z_translation_copy.spl and still received the same error.



  • 4.  Re: Adding Copy function to Right-Click Menu in Custom List Format

    Posted Jun 12, 2017 11:24 AM

    Hi andholmes,

     

    The name of spl is not mandatory, I use a z prefix for order, I tried with function z_translation::make_z_translation_copy(...) and work fine, I also add the method in webscreenpainter to define this, you can do that or make also a .mod file with the definition of method.