Whenever you create an article in salesforce its publish status is 'draft' by default. You have to publish that article to make it 'online'. In this blog we will learn how to publish draft article in salesforce by Rest API with the help of workbench :
Publish Draft article :
Here I am publishing one draft article. As you can see there is one one draft article in my org.
First you need to find articleVersionId of the article which you want to publish. To get the articleVersionIdList you have to query on the KnowledgeArticleVersion object.
Method :- Post
URL:- /services/data/v50.0/actions/standard/publishKnowledgeArticles
"inputs" : [
{
"articleVersionIdList" : [ "ka02x000000WGbwAAG" ],
"pubAction" : "PUBLISH_ARTICLE"
}
]
}
If you want to mass publish articles, you have to give comma separated id's in articleVersionIdList value in the request body.
Article Published:- After executing the rest service, you can see the article is published now.
Thanks,
Lovesalesforceyes
No comments:
Post a Comment