CA Service Management

 View Only
  • 1.  Duplicate Group Names in CA SDM 14.1

    Posted Sep 19, 2016 11:11 AM

    CA ServiceDesk is allowing to create duplicate groups (group with same name) and that is causing serious issue in reporting with great confusion. I can't impose any data constraint on cnt.last_name field as it will create trouble for contact record creation as well. May I ask for your help with any spel customization to apply a check constraint before we save the duplicate group names? Or any other better solution? I assume most of you guys have encountered a similar problem.

    We are running with SDM 14.1 with latest cumm patch.

    Please help me to deal with the situation.

     

    Thanks

    ArunavaS



  • 2.  Re: Duplicate Group Names in CA SDM 14.1

    Posted Sep 19, 2016 01:02 PM

     

    I have the same issue with CA Service Desk 14.1 on latest patches.



  • 3.  Re: Duplicate Group Names in CA SDM 14.1
    Best Answer

    Posted Sep 19, 2016 11:41 PM
      |   view attached

    Hi, extract files in archive to site/mods/majic.

    Please test it in Your test enviroment first!

     

    Archive contains two files:

    cntlastname.mod - contains trigger that fires spel code when group last_name is changed

     MODIFY cnt {
     PRE_VALIDATE zvalidate_last_name () 45821 FILTER( type == 2308 && last_name{});
     };  

     

    cntlastname.spl - contans spel code that checks if group last_name is unique

    cnt::zvalidate_last_name(...)
    {
    string wc;
    wc = format("type = 2308 AND  last_name = '%s'", last_name);
    send_wait(0, top_object(), "call_attr", "cnt", "sync_fetch", "MLIST_STATIC", wc, -1,0);
    if (msg[1]>0)
    set_error(1);
    set_return_data("Can not insert group with duplicate name");
    return;
    }

    Attachment(s)

    zip
    majic.zip   638 B 1 version


  • 4.  Re: Duplicate Group Names in CA SDM 14.1

    Posted Sep 20, 2016 04:59 AM

    Thanks Gutis. The code looks solid and it worked perfectly in our environment. Just have a question to understand the code better. Could you please share some knowledge on the parameter "MLIST_STATIC" on send_wait() function?

    Thanks

    ArunavaS



  • 5.  Re: Duplicate Group Names in CA SDM 14.1

    Broadcom Employee
    Posted Sep 20, 2016 09:20 AM

    Hi Arunava,

     

    The MLIST_STATIC is one of the recordset type that you can use in the below available list. Basically the MLIST_STATIC will fetch you results in the correct sequenced/sorted list.

     

    rs_type - the type of recordset you want returned. Should be one of these options:

    • STATIC
    • DYNAMIC
    • MLIST_STATIC
    • MLIST_DYNAMIC
    • RLIST_STATIC
    • RLIST_DYNAMIC

    For more information on the usage you can follow the below link:

    https://communities.ca.com/blogs/TIAGOMACUL/2016/01/01/httpwwwservicedeskuserscomsendwaitcallattrsyncfetch

     

    regards,

    MK



  • 6.  Re: Duplicate Group Names in CA SDM 14.1

    Broadcom Employee
    Posted Sep 20, 2016 04:09 AM

    Hi All, 

    I checked internally and it works as design. You may use the above spel code to restrict the duplicate creation which works fine. 

    With regards,Vinod