Skip to main content
7 votes

Assigning permission set to user in apex

List<PermissionSetAssignment> permissionSetList = new List<PermissionSetAssignment>(); for (User u : [SELECT ID,UserRole.Name,Profile.Name,IsActive FROM User WHERE UserRole.Name LIKE '%...
phani dev's user avatar
5 votes
Accepted

Unable to publish knowledge article in apex test class

Try to pass KnowledgeArticleId of your Article knowledge__kav. You might need to again retrieve the article record you have inserted and then Pass KnowledgeArticleId. In your case it will be : ...
sfdc_sk's user avatar
  • 179
4 votes
Accepted

Where does like & dislikes stores when we give knowledge article feedback

I'll break this up as I answered a different couple things for inserting a vote in apex, pulling the vote stats for an article, and for getting a normalized score of the article votes. Insert a vote ...
Kris Goncalves's user avatar
4 votes
Accepted

Automatically Publish Knowledge Article

KbManagement.PublishingService.publishArticle is supported for both classic as well as lightning. You need to pass the Knowledge__kav.KnowledgeArticleId field to it and not Knowledge__kav.Id. Sample ...
Anmol Kumar's user avatar
  • 3,631
4 votes

LWC is not showing up in Record page for Knowledge Record Page

We built something similar in the past, and we had to modify the component's configuration file as follow: Set isExposed to true, to allow the component to be used in Lightning App Builder, Define ...
Angelica Buffa's user avatar
4 votes
Accepted

Knowledge Article Not Copying Related Custom Object Record when in Draft Mode

Yes, this is the standard behavior Child objects are linked to the knowledge article version. You can maintain consistency by store Knowledge Article Id(Formula field) on the child object A ...
Anmol Kumar's user avatar
  • 3,631
4 votes
Accepted

Get Suggested Articles in apex

The Search Class has the following method suggest(searchQuery, sObjectType, suggestions which can be used If the searchQuery returns KnowledgeArticleVersion objects, pass an options parameter with a ...
Kris Goncalves's user avatar
3 votes
Accepted

Update Vote of KnowledgeArticle With API

As I didn't get answer from any source or documentation from Salesforce. I have raised a ticket with Salesforce Service Team. Salesforce Team informed me that Salesforce do not provide the provision ...
Mahak Bansal's user avatar
3 votes
Accepted

Enable Multiple Languages via knowledgeSettings in Scratch Org Definition File

Managed to figure out the correct JSON structure. language needs to be an array within languages field. { "orgName": "knowledge_dev", "edition": "Enterprise", "country": "US", "language": "...
smukov's user avatar
  • 5,593
3 votes

How to retrieve Data Category Group Visibility on Profiles, Permission Sets and Roles?

Data category visibility information is stored in the profile and permission set. Visibility information can only be retrieved using Profile(Permission set does not support category visibility ...
Anmol Kumar's user avatar
  • 3,631
3 votes
Accepted

Knowledge Article Suggestions: behavior differs between Classic and Lightning

In the lightning mode "Knowledge One" component is used and that's why "Knowledge One" component is showing at your first picture. In the second picture, you are using primitive version of Article ...
Santanu Boral's user avatar
3 votes
Accepted

Knowledge Article Version (Knowledge__kav) query returns only articles with the same language as current user

The default is en_US (or whatever the users setting is), if you want to retrieve articles in some other language, you will have to specify it in your query Always filter on a single value of ...
glls's user avatar
  • 20.2k
3 votes
Accepted

Rest callout via Batch Apex throws invalid session Id error

The session id that you get back from UserInfo.getSessionId() is not valid from batch code. This is actually due to be changed in the Winter 19 release: API calls sometimes require a session ID and ...
Aidan's user avatar
  • 13.7k
3 votes

How to Retrieve Knowledge Validation Status Picklist custom values?

Oddly enough if you create one in a scratch org it will be tracked as a StandardValueSet, but does not work with a metadata retrieve from a standard sandbox. === Source Status STATE FULL NAME ...
Michael Richmond's user avatar
3 votes
Accepted

Unable to Set CreatedDate only on Knowledge__kav

The knowledge article Considerations and activation of 'Create Audit Fields' has a list of objects that are available for these kinds of updates, and unfortunately Knowledge Article isn't one of them. ...
Victor Lockwood's user avatar
3 votes

SOQL Knowledge Search Activity

You can use SearchActivity object to perform a SOQL. Below is the sample query. You can modify the query as per your requirement. . SELECT Id,SearchTerm FROM SearchActivity Refer documentation here. ...
Hemant Jain's user avatar
  • 2,785
3 votes
Accepted

Object Prefix - Third Character

If you're familiar with the Dewey Decimal System (used to categories books in libraries), this conversation will feel familiar. For the most part, Salesforce uses the three prefix characters as a ...
sfdcfox's user avatar
  • 495k
3 votes
Accepted

What might be the reason for Gack Id -2137186094 when deploying KnowledgeValidationStatus standardValueSet picklist values

Looks like the problem arised when I tried to add Not Validated picklist value. Since this picklist cannot be retrieved, it is hard to guess the correct metadata file for it. When I changed from <?...
Patlatus's user avatar
  • 17.2k
2 votes

Unable to publish knowledge article in apex test class

I created a code snippet for future use. More details here. Code contains the following methods: getAllArticles createNewArticleAsADraft publishArticle unPublishArticle ...
Piotr Gajek's user avatar
  • 2,774
2 votes
Accepted

Knowledge tab in Salesforce Lightning

The knowledge tab(s) (for classic knowledge) are not Available in lightning, you still have to switch to classic to have access them. Unless you have enabled lightning knowledge, then you will be ...
glls's user avatar
  • 20.2k
2 votes

Can't enable Salesforce Knowledge in my sandbox

You can find knowledge user checkbox in user record like below image. Also check feature licenses under company information:
Reshma's user avatar
  • 4,039
2 votes

can the end user can view the knowledge articles published in the sales force? without the checkbox enabled in the user settings?

Simple answer is Yes. If you intend to use your community as a public knowledge base for unauthenticated (or guest) users, you can do so without purchasing communities licenses. For example, guest ...
Santanu Boral's user avatar
2 votes

Public Knowledge Base for Lightning Knowledge

This is the purpose of the Help Center Community template. There is no additional charge for this community as the cost of communities comes from logins. So, if it is public only there is no charge. "...
Aaron's user avatar
  • 21
2 votes
Accepted

Configure Einstein Chat Bots to show Knowledge Base Articles

I found the answer myself, way easier than I thought. You just have to give the rights in the permission set for bots. "Read" and "View All" rights for the Knowledge Object. With Knowledge Object, I ...
nesnaj713's user avatar
  • 248
2 votes
Accepted

Bulk Upload Attachments into Lightning Knowledge Articles

Unfortunately, I don't think you can do this in one load. ContentDocumentLink is what you need to insert that'll have a lookup to the file and the Knowledge Article. Both of those records need to ...
Kris Goncalves's user avatar
2 votes

Knowledge Article Not Copying Related Custom Object Record when in Draft Mode

We've had discussions with Salesforce and checked with the product team about this and they let us know this is by design and will not be changing. The reason for that has to do with the Knowledge ...
Kris Goncalves's user avatar
2 votes

How to get Sum of Knowledge Article Thumbs Up and Down Votes based on Role / Profile

You can not categorize knowledge articles on the basis of profiles as KnowledgeArticleVoteStat only stores channel and normalized score for an article. However, You can use the Knowledge Base ...
Anmol Kumar's user avatar
  • 3,631
2 votes

Notification after Knowledge Article is Published

Looks like this limitation is clearly documented. One workaround would be to maintain a custom field (may be a picklist or a Boolean ) and trigger off based on that and publish an article based on ...
Mohith Shrivastava's user avatar
1 vote
Accepted

Articles not displaying in Lightning Community

As an update regarding this question, I opened a case with salesforce regarding this and got a response that way. The issue was that our community was created with the language English (US) and at ...
Sean Davey's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible