• VHarSF
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
Hello everyone,

We have the below functionality on knowledge in our org.

On knowledge objec we have a self lookup to knowledge. We have 2 record types say A(Parent) and B(Child). On B knowledge record type we have a custom field named "Brand Index" to link the record A. If there is linkage between the 2 records the B records are displayed in a list view on A. 

The issue comes when we make the A as "Edit as Draft" and publish new version. The linkage on B still continues to have the old version article ID. We tried to implement the customization to update the " "Brand Index" lookup value on B to new article version but facing some challenges due to salesforce limitations in lightning.
  • Can't able to get both the archived and published versions of artcile in a single soql query. Tried with this query. [ select knowledgearticleid, publishstatus, MigratedToFromArticleVersion from Knowledge__kav where Title = 'Garden Brand Index' and publishstatus in ('archived', 'online') ]. This is returning only the published record. On further investigation we found that we should use IsLatestVersion = false to get the archived articles. But with this we can get only the archived record.
  • Can anyone know if there is any relationship between the published and archived version? If so how to find it?
The requirement in simple words is even if the parent article version is changed, the relationship field on child articles should be auto updated to new version.

Thanks to those who can help me!
  • November 24, 2021
  • Like
  • 0
can anyone give me apex trigger examples for better understanding of the apex trigger 
  • February 23, 2020
  • Like
  • 1
can anyone give me apex trigger examples for better understanding of the apex trigger 
  • February 23, 2020
  • Like
  • 1