Show a field when "Checkout" button is clicked in an knowledge Article

Ashwini Priyadh
Tera Expert

Hi There,

I have a requirement where a custom field in Knowledge table(kb_knowledge) called  "u_updates" has to be shown only when a user clicks on"checkout" button in an article form after it is published. 

Conditions:

The field "u_updates" should be displayed, when article is checked out and in draft state. It should not be displayed before the article is published.

I have tried OnClick in UI action of Checkout button, but it is not working as there is already some server side script was written.

Is this possible through UI Policy, if Yes, then please help with it.

Appreciate your help!!

 

Thank you,

Ashwini Y

1 ACCEPTED SOLUTION

Hi Yousaf,

I have achieved the solution by following steps,

- Created a field(u_checout) and hide it from the form.

- Edited the checkout UI Action to set (u_checkout) field to true onClick of Checkout button.

- Created UI Policy when u_checkout field is true, set visible the u_updates field on the form.

Thank you for your response anyways.

Ashwini Y

 

View solution in original post

2 REPLIES 2

Yousaf
Giga Sage

HI Ashwini,

Please check if this solution can work for you.

How to show fields on a form onclick of ui action??

also try this.

function onSubmit() {



   var action = g_form.getActionName();



   if(action == '<your buttons action_name>'){



           g_form.setVisible('<your_field_name>',true)



           g_form.setMandatory('<your_field_name',true);



           return false;



   }



}

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

Hi Yousaf,

I have achieved the solution by following steps,

- Created a field(u_checout) and hide it from the form.

- Edited the checkout UI Action to set (u_checkout) field to true onClick of Checkout button.

- Created UI Policy when u_checkout field is true, set visible the u_updates field on the form.

Thank you for your response anyways.

Ashwini Y