CA Service Management

Expand all | Collapse all

Adding a contact lookup field on an employee request Form

  • 1.  Adding a contact lookup field on an employee request Form

    Posted Nov 09, 2016 02:39 PM

    I need to add the ability for our employees to search for another contact to apply as the affected end user of the request. Ideally they get roughly the same sort of functionality as the analyst but with less information being revealed to them. This gets later used in a workflow where the customer gets sent a PAM IRF to complete. I already tried adding the Lookup field but it will not reveal any other contacts other than the one that is logged in at the employee level. How can I accomplish the functionality that I'm looking to achieve? 



  • 2.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 09, 2016 03:46 PM

    First of all, you would need to set the Employee Access Type Licensed? attribute to Yes. (Note that this means you will be consuming licenses for your Employee logins and not just your Analyst logins.)

     

    Then, in the Employee Data Partition you would need to remove the View constraint on the ca_contact table.

     

    Lastly, you are going to need list_cnt.htmpl and detail_cnt.htmpl forms in the $NX_ROOT\site\mods\www\htmpl\web\employee folder in order to be able to search and view contacts.



  • 3.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 09, 2016 04:21 PM

    Thank you Lindsay. As always you're incredibly helpful. Is there a work around to avoid turning on licensing? We're trying to give the employees the ability to enter either their supervisor or someone else in their cost code as the owner of their request. We're not giving them the ability to actually look at those entities information other than their names. Perhaps there is some sort of design consideration I'm not employing here that could achieve the same goals? 



  • 4.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 09, 2016 04:32 PM

    No workarounds of which I am aware. Suggest you talk to your CA Technologies Account Rep.



  • 5.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 09, 2016 04:36 PM

    Already opening up the channels with them on it. Again, many thanks!



  • 6.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 07:59 AM

    There is two possibilities i see:

    First is to create additional object e.g. zcustom_contact that will contain only few attributes you need and SREL to the contact. Then you may use pdm_user load and pdm_deref to load initial information to the custom table and to establish relationships. After that you will need to create trigger on contact insert  that will call spel code to insert related record to custom table.

    Second option is to create custom factory on cnt object. Never tried this but this may just work since CA implementation simply adds hardcoded whereclause "AND id = @cnt.id" for users that are not licensed.



  • 7.  Re: Adding a contact lookup field on an employee request Form
    Best Answer

    Posted Nov 10, 2016 04:19 PM

    Lindsay_Estabrooks, as it turns out licensing does not need to be turned on for the employee. I called into support and Chi_Chen was able to confirm that for me over the phone. 

    But the other two steps you mentioned are correct: 

    Per Lindsay:

    • In the Employee Data Partition you would need to remove the View constraint on the ca_contact table. 
    • Lastly, you are going to need list_cnt.htmpl and detail_cnt.htmpl forms in the $NX_ROOT\site\mods\www\htmpl\web\employee folder in order to be able to search and view contacts.

     

    Again Many thanks for your help guys



  • 8.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 05:28 PM

    Hi.. I just wanted to add that we also have the Licensed? attribute checked for our employee role, because we want the ability to send a manual notify email from a ticket to any contact, and allow them to reply to that email and update the ticket, even though they are not the customer or requester.  (An example of how we use this is when we need to send an email to the customer's manager asking for approval.)  I just unchecked the box in our 'test' system and tested, and the reply does not update the ticket.  Maybe it's because we need them to be able to update someone else's ticket, and you just need them to be able to see a list of all contact records?   Maybe Chi_Chen can confirm that?

     

    I was really hoping something had changed and we no longer needed to have it set up this way just to allow any contact to reply to an email and update the ticket.

     

    Thanks.

    Tammy



  • 9.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 08:42 AM

    Last night I attempted to use Lindsay's approach and that worked. I spoke with the powers that be here and they relayed that any change to licensing isn't an option for us. So out of curiosity I turned off licensing for the employee and low and behold the lookup is still working with just the constraint disabled. I'm thinking that if I modify the constraint a little to allow only those in the same cost code we should be ok. What I'm a little uneasy about though is that it's working now with the Licensed? attribute set to No which doesn't make sense. Thoughts?



  • 10.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 09:09 AM

    Try to restart system and it should stop to work. I think it is cached somewhere.



  • 11.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 09:50 AM

    Did that, still works. 



  • 12.  Re: Adding a contact lookup field on an employee request Form

    Posted Nov 10, 2016 01:12 PM

    One other question regarding this, how would I go about defaulting the field to the employee's supervisor?