how to display UI macro button for a field in change request form only

balmansour
Tera Contributor

I have wrote this UI macro script to display a button next to a field called External reference field, the purpose of this button is when you click on it, it opens a new page (external website) 

 

there is new requirement which is:

this UI macro button should only be visible in change request form because the field "External reference" appears also in other forms like incidents

 

<?xml version="1.0" encoding="utf-8" ?>

 

<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">

<img src="some_logo.jpg" stype='width=1px, hight:1px' onclick="changelist()" title="{gs.getMessage('go to website'}">

</img>

<script language="javascript">

 

    function changelist(){

        

      

        var tableName='change_request';

        var url='some websit link';

 

        window.open(url,'_blank');

        return false;

    }

    </script>

        </j:jelly>

How can I apply this new requirement? any tips?

2 REPLIES 2

Utpal Dutta
Tera Guru

Hi there,

I found an community article which will help you achieve this requirement here.

 

If it does then please mark my answer correct!

 

Thanks,

Utpal

Hi 

I do not need to specify the domain, I may need to specify the table 

so that the UI macro button will only be visible in the change request form