How to hide New button of Change Tasks on Change Request only for STANDARD CHANGES

BHIM RAO2
Tera Expert

There is a need to hide the New button of Change Tasks on Change Request only for STANDARD CHANGES.

In Emergency and Normal change, the New button should be visible.

Could someone help what script I need to write in Omit New condition please?

find_real_file.png

 

1 ACCEPTED SOLUTION

Script like this, use my instructions above around getting to configure > list control:

var answer = false;
if (parent.type == 'standard') {
    answer = true;
}
answer;

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

13 REPLIES 13

Script like this, use my instructions above around getting to configure > list control:

var answer = false;
if (parent.type == 'standard') {
    answer = true;
}
answer;

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

After adding this above script .New button is invisible for Normal and Emergency change also.

And there is one more condition we need New button to be hidden. All change type with state != Closed or Standard changes

Hi,

I'm unsure of your scripting knowledge and was hoping to provide a pretty good example for you to then improve upon, which I did above. That gives you good baseline to work from.

Please ensure you logout/log back in and perhaps clear your instance cache by typing: cache.do and pressing enter in left-hand nav.

The code I provide does work as I'm using it in my instance right now:

Standard change:

find_real_file.png

Normal and other change:

find_real_file.png

Did you need more assistance than that? You did not state the additional state requirement in your original question. Please ensure you include everything so that we can help accordingly. Otherwise, we work on it work for to help, you add more piece by piece, which isn't very fair to others helping.

So now you're saying:

"And there is one more condition we need New button to be hidden. All change type with state != Closed or Standard changes"

So you want to hide the new button for all change requests that are not closed...so they can only open a change task if the record is closed? That doesn't sound right to me.

Please take time to fully describe what you need assistance with as your original question has been answered by my instructions and script above.

Thank you so much!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

Yes, my original post was an incomplete statement of need. Sorry about that.

After a bit of modification to the script, it is fulfilling the new need.

Hide  new button conditions:

1. for all standard changes  

Or

2. other changes with state closed or canceled.

 

Thanks for your support!

 

Hi @BHIM 

If my post was the one that helped guide you correctly and helped, please mark that as Correct.

Currently, you have your own post marked as Correct.

Thank you!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!