• Piotr Gajek
  • 20 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 8
Hi Everyone,

When I try to move published article to draft using this code , 
String str =KbManagement.PublishingService.editOnlineArticle('kAA4C000000CaTmWAK', true);, it throws following error.
System.HandledException: You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.
I'm runing this code as system admin who have "Manage Article Permission".

Can you guys get me a solution for this.

Below is the problem we are trying to resolve. 
- We have bought an Appointment booking product (Booking Bug)  which will be added to our customer community.
- Community user will click on a button/link to book appointments 
- Appointment booking screen opens in an iFrame
- user books the appointment
- At the end of process we want the appointment system to auto populate logged in user details ( Contact Name, email, Account name, Number)  on the appointment  booking form.

we are exploring the use of connected Apps to get the details however there are challanges with that. 
Are there any mechanisms/solutions to resolve this problem.

I have a requirement
In which have to Integrate between Salesforce to Salesforce using REST
Could please provide any sample program to proceed with POC.
Sample worked example's or sites for reference are appreciated.
I have a need to get the User object for the user who logged into SFDC so that I can use it in my community. After using "log in to community as user" how can I use Apex to get the original Salesforce user?

I met a problem, now I create a custom profile with license "Custom Community Login", and also one pubilc site (Community), then I hope that I could download file (a link) with this profile, but it always failed. Could it work with this license ?

Thanks !

Is it possible to update Knowledge Article record using apex.

I am trying like this..
list<KnowledgeArticleVersion> kv=[SELECT Id,Title,UrlName,Summary,KnowledgeArticleId FROM KnowledgeArticleVersion WHERE Language =:'en_US' AND PublishStatus =:'Draft' WITH DATA CATEGORY NOWTVKnowledge__c AT Cancellations__c];
system.debug('@@@ '+kv[0].KnowledgeArticleId);
kv[0].UrlName='Test 1234';
update kv;

Like this I am getting error like urlname not writable.

Could you help me how to update article data using apex coding with small example...

Thanks in advance..



Because of a problem in a migration of knowledge base articles from a 3rd party system, we need to update a few thousands articles. Unfortunately, Salesforce doesn't allow to programmatically update the article objects, whether through the API or Apex.


The solutions seems to be either update manually the solutions (which is hardly feasible considering the number) or wipe all the solutions and start the migration again (except we've already started using some articles).


An alternative I'm investigating is to write a program that would generate a huge Windows PowerShell script that would create an Internet Explorer instance and control it to log in and programmatically modify each article, one at a time. But before going that route I was wondering if people have other suggestions.