List<Knowledge__kav> articles = ArticlesUtils.getAllArticles(); String newArticleKnowledgeId = ArticlesUtils.createNewArticleAsADraft('SalesforceProfs', 'salesforce-profs'); ArticlesUtils.publishArticle(newArticleKnowledgeId); //unpublish, update, publish > separate actions String newArticleVersionId = ArticlesUtils.unPublishArticle(newArticleKnowledgeId); ArticlesUtils.updateDraftArticleWithoutPublish('SalesforceProfs Update', 'salesforce-profs-update', newArticleVersionId); ArticlesUtils.publishArticle(newArticleVersionId); //update - contain unpublish, update, publish //ArticlesUtils.updatetArticle('SalesforceProfs Update', 'salesforce-profs-update', newArticleKnowledgeId);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter