You need to sign in to do that
Don't have an account?
Ram@sfdc
Knowledge Article data update using apex
Hi,
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..
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..
system.debug('@@@ '+kv[0].KnowledgeArticleId);
kv[0].UrlName='Test 1234';
update kv;
Regards,
Subramani.J
TRINAY TECHNOLOGY SOLUTIONS
Thanxs for ur reply,
There is no such object Article__Kav in my Org.
Could you suggest me how to get all Knowledge articles from Org. with a single Query.
http://www.salesforce.com/docs/developer/knowledge_devpre/index.htm
I had the same problem.
More details on my blog here (https://salesforceprofs.com/updating-knowledge-articles-programmatically-by-apex/).
Here you can find a code snippet and example of use, which should resolve your problem:
Regards,
Piotrek