CA Service Management

  • 1.  Create a LREL for CHG to CHG

    Posted Oct 28, 2016 03:33 AM

    Hi all,

     

    I am trying create a many to many relationship between change order and change order itself.

    The Doc from cdtj helps, but I am stuck at modifying the htmpl files.

     

    Here are what I did so far:

     

    1. Create a lrel table z_lrel_chg_chg
      • field 1: parent
        • type: SREL
        • table: chg
      • field 2: child
        • type: SREL
        • table: chg
    2. Add two fields to table chg
      • field 1: z_parent
        • type: BREL
        • table: z_lrel_chg_chg
        • BREL Query Information: parent { LREL child; }
      • field 2: z_child
        • type: BREL
        • table: z_lrel_chg_chg
        • BREL Query Information: child { LREL parent; }
    3. Update HTMPL
      1. list_chg.htmpl
        • Added 
          var enableExtraBtn = true; 
          cfgExtraButton = new Array("Update LREL", "zCreateNew()", enableExtraBtn); 
          function zCreateNew() { 
            update_with_lrel_style('chg', ahdframe.argPersistentID, 'chg', 'z_child',  'Change', 'Added Change', '', 'KEEP.ForChild=1+KEEP.exclude_chg_ref_num=1'); 

           

      2. detail_chg.htmpl
        • Added
          <PDM_MACRO name=tab title="CHANGE" height=600 id=chg src="OP=SEARCH+FACTORY=chg+QBE.EQ.z_child.parent.id=$args.id+KEEP.ForChild=1">

     

    But in the detail_chg tab, I would have a normal list of change order instead of list of child change and the 'Update LREL' is missing.

     

    Best regards,

    Conan



  • 2.  Re: Create a LREL for CHG to CHG

    Posted Oct 28, 2016 08:18 AM

    Hi Conan,

    OOTB ticket forms like chg or cr have a lot of conditions that can override enableExtraBtn param, try to define it closer to sfStart macro.



  • 3.  Re: Create a LREL for CHG to CHG

    Posted Oct 28, 2016 09:17 AM

    Hi Conan,

    Unfortunately as you know this one is outside the scope of support, however, there may be some additional folks out here on the communities that have gotten this to work and may be able to share their information with you.

    Thanks,

    Jon I.