Home General Discussion

Dynamic Link in portal

Damian_SheillDamian_Sheill Customer IT Monkey ✭
edited March 2020 in General Discussion

Hi all,


Quick question, I have a requirement for a customer to create a "My Info" page and would like to use the existing User Info page because they want the related asset and work item views. Creating a new static link is not going to be sufficient as the user global ID will obviously change each time. How can I create this programatically if at all possible?

So the format of the Link would be like so:

https://tpa015.cyfoethnaturiolcymru.test/user/UserRelatedInfoById/XXXXXXXUserGlobalIDXXXXXXXXXX


Many thanks for answers in advance,


Damian

Answers

  • Nicholas_VelichNicholas_Velich Cireson Consultant Ninja IT Monkey ✭✭✭✭
    edited March 2020

    Hi Damian,


    There isn't a way to put a dynamic property directly on that link; however, you could certainly accomplish this in other ways. For example, you could do the following:


    1) Create a "New Page" from the Navigation Settings menu. This will allow for a clickable icon on the left hand side, and will be used to redirect users to the out-of-box users page you noted above.


    2) Add code to your custom.js file that runs when users access this new page, and redirects them to the UserRelatedInfoById page with the currently logged in user's GUID as a parameter. You can access the currently logged in user's GUID using the variable/property "session.user.Id" within your custom.js code.


    Hope this helps!


    Thanks,

    Nick

Sign In or Register to comment.