Category: Data Model

Difference Between WhoId and WhatId in Salesforce

In the realm of Salesforce, understanding the intricacies of its data model is crucial for effective customization and utilization of the platform’s functionalities. Among the nuances lies the concept of polymorphic fields, particularly evident in the Event and Task objects through the whoid and whatid fields. These fields play a pivotal role in associating records with various objects, enabling flexibility and efficiency in managing sales and customer interactions. In this blog post, I will delve into the disparities between whoid and whatid, shed light on their polymorphic nature, and provide examples of SOQL queries to leverage their capabilities.

Read More

Understand Salesforce Lightning Knowledge Data Model

While working with Lightning Knowledge, what I realized is that there is hardly any tutorial/post which explains the Knowledge Data Model in a very simple way. So I thought of writing my understanding with examples covering the part of the data model. I hope this will help you to understand the data model clearly and quickly.Understanding the data model is always very important while doing the development as it will help you to play with the objects and do configure/customization that is possible, basically getting the maximum benefit of the platform.To start with, the Knowledge Object Model is based on Abstract and Concrete objects. Core Abstract and Concrete ObjectsThe core abstract objects are – KnowledgeArticle and KnowledgeArticleVersion. The corresponding concrete versions are – Knowledge__ka and Knowledge__kav.Below is the data model from the Salesforce Developer Guide -Complete Data Model Relationship between Knowledge__ka and Knowledge__kavAs per the data model, the relationship between Knowledge__ka and Knowledge__kav is 1 to many. That is one Knowlegde__ka can have multiple Knowledge__kav. The link is happening through KnowledgeArticleId (remember KnowledgeArtcileId and Id are two different fields). So let’s check the example below.The “HelloWorld” article is having two versions – Now if I run the query against Knowledge__ka, I am getting one entry which provides me the KnowledgeArticleIdNow with the same KnowledgeArticleId, if I query Knowledge__kav, I will get one entry. Surprised?? Why only one entry where it should be...

Read More
Loading

Earlier Posts

  • 2024 (17)
  • 2023 (47)
  • 2022 (25)
  • 2021 (35)
  • 2020 (41)
  • 2019 (13)
  • 2018 (16)
  • 2017 (14)
  • 2016 (18)
  • 2015 (74)
  • 2014 (20)