change the view of the form automatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 11:03 PM
We have a knowledge base(public) and the articles created under it have a different view(public) . a new module is created under knowledge menu to track/view /create knowledge articles of the KB and view rule is also created for it so that when the user comes to this module and view/create the articles the form will be displayed as per the view configured
Now the challenge is for example if the user want to create a new article not from the created module in general if the user goes to my knowledge articles menu ->new-> select KB-> and fill the form and submit the view will be default only
so the clients have asked us to change the view when ever the user selects the knowledge base as public the view of the form should be public only
for example if the user make the filter knowledge base as public and if he click on the new button the form which displays should not be default one
for this i am trying to create a on change client script for the knowledge base field on change of the knowledge base field the view view should be changed and also on load of the form for the knowledge base =public the form should be public view please do help us in achieving this requirement
The view rule i have created works for only the new module we have created it is not working when ever we keep the filter condition knowledge base=public
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 11:19 PM
Hi,
we can achieve the functionality by onload client script.
we have "switchView" function to Achieve that.
switchView(type,table,view);
Ex:
function onLoad() {
if(knowledge_base == 'xxxxxx'){
switchView('section','kb_knowledge',yyyy_view');
}
}
Thanks,
Sohail Khilji
Kindly mark the answer correct or helpful if it addresses your concern....
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 12:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2022 11:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2022 12:34 AM
Hi sumanth ,
i tried the above as well the onchange script but it did not work