4 Replies · Latest reply on Jan 4, 2018 6:28 AM by Ashley Cordell

    Raising Request in Multiple Domains

      Hello,

       

      As a company we have internal staff member's requesting project work from our engineering group. As these are project requests they should be requested on behalf of the customer and be raised in that customers domain. The PM team also work across multiple accounts so need the ability to raise requests in multiple customer domains.

       

      Can anyone help us to understand how a user can raise requests in other domains - I have attempted to raise a request (as an ITIL users) in another domain by changing my domain picker at the top of the screen however this still raised my request in the MSP domain (as I am a member of that domain).

       

      Any ideas or thoughts would be greatly appreciated.

       

      Kind Regards,

      Ashley

        • Re: Raising Request in Multiple Domains
          Chris Ironside

          Hi Ashley,

           

          We have our domain separation set up so that any requests will be raised in the domain of the requester, it sounds like you may have your instance set up in the same way, if you raise a request on behalf of a user from another domain it should then sit in their domain. (I believe it is the caller field that it works on)

           

          There are business rules set up in the background to handle this so creating a request in a domain that is not the requester's domain is difficult.

           

          Kind Regards

            • Re: Raising Request in Multiple Domains
              Ashley Cordell

              Thanks Chris.

               

              Yes we did try raising on behalf of a user who is part of the customer domain but the request item still sits within my managed domain and then the tasks trigger within the requested for domain - the issue with this is when reporting the request items are sitting in the wrong Domain as well as people in the MSP domain then have visibility of those items (even if they are not entitled to view that customer domain).

               

              Would you know of anything we can do to amend the background business rules to make this easier?

               

              Kind Regards,

              Ashley

                • Re: Raising Request in Multiple Domains
                  Chris Ironside

                  Hi Ashley,

                   

                  I've just had a look at my instance and can't find anything running on the project table to change the domain, I would therefore just add a new business rule in after insert, something like the below should work but with the 'requested_for' changed to whichever field you are using to log against the user.

                   

                  function onAfter(current, previous) {

                     var user = new GlideRecord('sys_user');

                     user.get(current.getValue('requested_for'));

                    

                     current.sys_domain = user.getValue('sys_domain');

                     current.update(); 

                  }

                   

                  You may be able to change it to an onBefore script and remove current.update() but depending on what is changing the domain in the first place it may just change it back on the insert.

                   

                  Kind Regards