2

I'm attempting to use Salesforce's SOAP API to publish a knowledge article, but when I set the PublishStatus to Online, I get the following error: Unable to create/update fields: PublishStatus. Please check the security settings of this field and verify that it is read/write for your profile or permission set.

[errors] => Array
    (
        [0] => stdClass Object
            (
                [fields] => Array
                    (
                        [0] => PublishStatus
                    )

                [message] => Unable to create/update fields: PublishStatus. Please check the security settings of this field and verify that it is read/write for your profile or permission set.
                [statusCode] => INVALID_FIELD_FOR_INSERT_UPDATE
            )

    )

Checking the "Knowledge Field-Level Security for profile" for the account I'm using Salesforce with, "Publish Status" has Read Access and Edit Access both checked. How do I alter the Publish Status field on a Knowledge Article with this error?

0

In KnowledgeArticleVersion.PublishStatus it says:

A user must have the “Manage Articles” permission enabled to use Online.

Does your user have that permission to move from Draft to Online status? A quick check might be to see if the same user can publish the aritcle via the standard UI.

  • Yes, I can publish articles in the standard UI using the same user account that I'm using for the API. It works fine in the standard UI without errors. – Cole Marshall Nov 24 '16 at 2:43
  • @Cole. Is the only change after you've done it via the UI to the KnowledgeArticleVersion.PublishStatus field? What does the debug log show for DML statements. Looking for ways to replicate what is working via the UI. – Daniel Ballinger Nov 24 '16 at 7:05
  • Yes, I'm only clicking "Publish..." and then selecting "Publish Now". I turned on the debug log and and set it to record everything, but it doesn't appear to show any DML statements. – Cole Marshall Nov 30 '16 at 21:31
0

According to a Salesforce support technician, it is not possible to to update the PublishStatus field via the API at this time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.