Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
5 votes
Accepted

Publishing Article in Test Class

The method KbManagement.PublishingService.publishArticle(articleId, true) needs a KnowledgeArticle Id. What you are trying to do is giving the KnowledgeArticleVersion Id to the method. You can see the ...
Folkert's user avatar
  • 2,712
5 votes
Accepted

Preventing downloading files from Community for particular users

You can take a look at ContentDownloadHandlerFactory and ContentDownloadHandler to implement your own custom solution. When a download is triggered either from the UI, Connect API, or an sObject call ...
Oleh Berehovskyi's user avatar
4 votes
Accepted

approve article before publish

Knowledge Article object is very special object - you can not track changes of PublishStatus field in trigger/process builder. As workaround (not very good solution) - Remove "Publish" button from ...
Ayub's user avatar
  • 3,523
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
3 votes

One query that will work for getting Article Owners across all Knowledge article categories?

Article belongs to specific Article Type object. To retrieve the CreatedById, you need to retrieve from Knowledge Article version object which end with _kav SELECT Id,Title,UrlName,Summary,...
Santanu Boral's user avatar
3 votes

UPDATE VIEWSTAT not working in test class

This is probably covered as a known limitation of unit testing. As mentioned in Isolation of Test Data from Organization Data in Unit Tests: There might be some cases where you can’t create certain ...
sfdcfox's user avatar
  • 494k
3 votes
Accepted

Version comparison tool

I would leverage a 3rd party JavaScript library for this. Pick one from these search results https://www.google.com/search?q=diff+javascript. Your Visualforce then only needs to display the two ...
Keith C's user avatar
  • 136k
3 votes

How to get all the deleted Knowledge Article in Salesforce

This is really weird, maybe salesforce is storing deleted article somewhere else. With following query, it shows the deleted KnowledgeArticle's: SELECT Id, ArticleNumber, ArchivedById, ArchivedDate ...
Raul's user avatar
  • 18.8k
3 votes

Create/Edit or Update a knowledge article in Salesforce using apex code

I know that it was a few years ago, but here is my code snippet for future usage. I used publishArticle(articleId, flagAsNew) and editOnlineArticle(articleId, unpublish). You can find more details on ...
Piotr Gajek's user avatar
  • 2,754
2 votes

Automatically Adding Articles into Community Navigational Topics

This idea already delivered by the Automatic topic assignment feature. http://docs.releasenotes.salesforce.com/en-us/summer17/release-notes/rn_networks_automatic_topic_assignment.htm
MaCsi's user avatar
  • 121
2 votes

Articles not visible to Salesforce Community members

I am so pleased to have found this post! I had exactly the same problem: could search for and view articles, but none were showing up in in navigational topics. As we have another Experience Cloud ...
commscath's user avatar
2 votes

Articles not visible to Salesforce Community members

Just Enable Read Permission in Knowledge Base Permission Section in Customer Community Plus Login User new profile. You will see that Articles are now visible for guest users in community. It worked ...
Gaurav Suryawanshi's user avatar
2 votes

JavaScript or JQuery function in Html editor of rich text editor

No, the design requirements of a rich text field is to include only html mark up and strip away active content such as javascript. All JS event handlers are removed and only a whitelisted set of tags ...
Robert Sussland's user avatar
2 votes

Article content overview field

I think Content Overview is the custom field. You can verify this field & related API in article types (Object API Name ends with _kav). You can retrieve the field values using SOQL query.
Santanu Boral's user avatar
2 votes
Accepted

When you create a Public Knowledge Base article, how do you see what URL it has?

The Url will generaly point towards your Salesforce instance https://yourInstance.salesforce.com for Ex. A recent dev org, will have https://na40.salesforce.com/articles/language/articleUrl if you ...
glls's user avatar
  • 20.2k
2 votes
Accepted

How to differentiate between Knowledge Article Types with status=In development an status=Deployed via Apex

How to achieve this via Apex: Use MetadataService API MetadataService class can be downloaded from here: https://github.com/financialforcedev/apex-mdapi/blob/master/apex-mdapi/src/classes/...
Bhoopender Pal Singh's user avatar
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

UPDATE VIEWSTAT not working in test class

As per @sfdcfox, you are going to need to mock these using a mocking technique Here's an example using ApexMocks and Force.com Enterprise Architetcure Selector layer (my example is Accounts but you ...
cropredy's user avatar
  • 71.8k
2 votes
Accepted

Assigning the topics you've selected ins't allowed. A Salesforce Admin must enable topics for objects for the article type/s

This means that for the Objects related to knowledge (Lets say you have objects like FAQ) needs to have Topics Enabled . To enable the topic navigate to Set up|Customize|Topic| Topics For Objects and ...
Mohith Shrivastava's user avatar
2 votes
Accepted

What are the differences between Knowledge Article Types and Knowledge object Record Types?

Knowledge Articles are individual articles. For example, it might be how to fix a widget or run a report. This is similar to how you'd say that a record is an Account or a Contact. It is a specific ...
sfdcfox's user avatar
  • 494k
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
1 vote

unable to delete duplicate article From Developer console Anonymous Window

Knowledge Object is very special object...you can not simply delete as other object. There is special class to perform DML on Knowledge Objects: https://developer.salesforce.com/docs/atlas.en-us....
Ayub's user avatar
  • 3,523
1 vote
Accepted

Knowledge Articles in Communities Custom VF + Tabs

I originally posted the question as the LastViewedDate wasn't being updated when the Community user accessed the public link to the Article's file. The solution to this one was not too complicated - ...
Glen De Marcos's user avatar
1 vote
Accepted

Napili - Article content missing from Article Content Component

If you're trying to "hard code" a specific article such that it shows on the page you'll want to use the KnowledgeArticleVersionID and not the KnowledgeArticleId. We're using a specific article for ...
ClarkBranson's user avatar
1 vote

How to know the total how many views of knowledge article by each User?

If you are using a custom visualforce page (or a community with lightning components) to display your articles, then you can include code in the controller for tge page or component to create a record ...
bpilling's user avatar
  • 670
1 vote
Accepted

robots.txt for public facing knowledge articles?

On force.com sites you can create a custom robots.txt file and modify . Here are some the links to assist Help Resource From SFDC Best Practices For SEO Setting Up SEO In nut shell to summarize ...
Mohith Shrivastava's user avatar
1 vote

How to Get all Knowledge Article Types?

You can use KnowledgeArticleVersion object to query for articles across all article types depending on their version. Try this SELECT Title, Summary FROM KnowledgeArticleVersion WHERE PublishStatus='...
Ankita's user avatar
  • 1,478
1 vote
Accepted

One query that will work for getting Article Owners across all Knowledge article categories?

Just in regards to the Id values themselves, you can determine the specific type you need to query by using a script like the following: Id dummyId = Id.valueOf('ka0'.rightPad(15, '0')); system.debug(...
Adrian Larson's user avatar
  • 150k
1 vote

Is there some way to associate "sites" with "Articles"?

On a site, you can specify what knowledge articles can be searched, either by Data Category, knowledge article type, etc etc... Then you can specify in your robots.txt what sites you want indexed or ...
glls's user avatar
  • 20.2k
1 vote
Accepted

Salesforce Archived Knowledge Article shows in recent items

This is standard behavior. The recent items list is an MRU (most recently used) cache. It doesn't get updated automatically based on access or permissions changes. So even if the article is archived ...
Paul H.'s user avatar
  • 1,338

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