Add edit button in the related tab

Kaushik Ghosh
Tera Contributor

I need to add the 'EDIT' button in the 'Attached Knowledge' related tab for 'Emergency' and 'Normal' changes, I have added the 'EDIT' button and added the omit condition. Still, the 'EDIT' button is showing for the Standard Change.

 

The omit condition for EDIT - current.type == 'standard';

 

Screenshot of the List control.

KaushikGhosh_0-1683202108198.png

 



1 ACCEPTED SOLUTION

asifnoor
Kilo Patron

Hi,

Use it like this, then it will work.

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

 

Mark the comment as a correct answer and also helpful if this has answered your question.

View solution in original post

3 REPLIES 3

asifnoor
Kilo Patron

Hi,

Use it like this, then it will work.

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

 

Mark the comment as a correct answer and also helpful if this has answered your question.

umaaggarwal
Giga Guru
Giga Guru

Hi Kaushik,

 

on current refers to KB article not to the change so in order to access the change fields in this script, you need to use parent. 

 

Try using below script in both omit conditions. IT is working for me 

 

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

Harsha_165
Tera Contributor

Hi Kaushik, I have a requirement to create the EDIT button in the 'Attached Knowledge' related tab for Incident form. Please share how to achieve that.

 

Thanks,

Harsha