function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sachin Kumar 255Sachin Kumar 255 

Lightning Knowledge Articles Load With Publish Status

Hi All,

We are migrating articles from external application into lightning knowledge.

All of those articles are already in published status and accessible to end customer through external website. Now i would like to move these into ligjtning knowledge through bulk api and inserting into knowledge__kav object. Challenge is Salesforce doesnt allow me to imsert articles with status as "published" but allows me to insert as "Draft". It throws some permission related error.

Any solution to overcome this problem so that i can insert articles direcly with "Publish" status.

Thanks,
Sachin
SwethaSwetha (Salesforce Developers) 
HI Sachin,
As mentioned in the documentation  (https://help.salesforce.com/articleView?id=000312783&type=1&mode=1), "It's not possible to update an article's PublishStatus via the Data Loader and it's necessary edit each article you would like to update to create a draft version."

It looks like a limitation. Please consider submitting an Idea on IdeaExchange.

If this information helps, please mark the answer as best. Thank you
Sachin Kumar 255Sachin Kumar 255
Thanks for responding Swetha! I cam eacross this help article already but not find itsvery clear.

Are you suggessting to create all the articles with Draft Status and in 2nd run update them to Publish. For e.g. If I had to load 2000 Articles using Bulk API in batch of 200:

01. Prepare articles Object in required format of "Kowledge__Kav" object and keep status as "Draft".
02. Load them into LIghtning knowledge using Bulk API.
03. Query these 2000 inserted articles which must be in Draft status as we inserted in Draft Status.
04. Update the status field to "Published" and load them again in Lightning Knowledge using Bulk API.