Need to add a condition Relationships for Related List

venugopal s
Tera Contributor

Hi Everyone,

I need to update a condition on Relationships, Where 

  • Need to update the query to filter only for Personal Computer:

    • model_category=451c87f6db41e2407be67bec0f96193a

    • Applies to Table - Hardware

    • Queries from table  - sys_email

      Script:

      (function refineQuery(current, parent) {

       

          current.addQuery('instance', parent.sys_id);

       

      })(current, parent);
       

 

1 ACCEPTED SOLUTION

@venugopal s 

 

try this, 

function onLoad() {

    var ModalCat = g_form.getValue('model_category');

    if (ModalCat != '451c87f6db41e2407be67bec0f96193a') {
        g_form.hideRelatedList('REL:48c2c2f9977fb110fea876d11153af0c');
    }
}

 

View solution in original post

5 REPLIES 5

@venugopal s 

 

try this, 

function onLoad() {

    var ModalCat = g_form.getValue('model_category');

    if (ModalCat != '451c87f6db41e2407be67bec0f96193a') {
        g_form.hideRelatedList('REL:48c2c2f9977fb110fea876d11153af0c');
    }
}