1

I'm actually creating a knowledge article from my apex class and I need to provide access to our external users (i.e. community / portal users) so that they could access these newly created knowledge articles. I tried setting the channels by marking IsVisibleInPrm, IsVisibleInPkb, IsVisibleInCsp, IsVisibleInApp fields as true for the knowledge article and the related sObjects. But it seems that these fields are not writeable.

Can we set the Channels (i.e. all isVisible fields) for any of the published knowledge articles from apex so that it is accessible to the portal/community users?

  • You will need to set that in article management tab .You cant do this from apex . – Mohith Shrivastava Oct 21 '14 at 17:04
  • Hey Mohit.. Are you sure about this? I'm asking this because if we can do it from the (standard) knowledge management tab then there would be a way to achieve this from apex. – user1206 Oct 21 '14 at 19:41
  • I am sure that you can do through article management .Apex i am not sure – Mohith Shrivastava Oct 21 '14 at 20:26
-1

You can simply update the field value while creating the knowledeAticle using apex.

A sample snippet would be:

 General__kav onlineHelp = new General__kav();
 onlineHelp.Title = title;
 onlineHelp.UrlName = url;   
 onlineHelp.MainArticle__c = 'abc'; 
 onlineHelp.IsVisibleInPkb = True; 

You know can also use KbManagement class to publish the article using apex.

Cheers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.