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?

3
  • You will need to set that in article management tab .You cant do this from apex . Commented Oct 21, 2014 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
    Commented Oct 21, 2014 at 19:41
  • I am sure that you can do through article management .Apex i am not sure Commented Oct 21, 2014 at 20:26

1 Answer 1

-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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .