Vlocity Facts #18| How to Fetch RecordType id, DeveloperName by using DataRaptor or Query function in formula tab

In real time scenarios we need to get the recordtype name or id related to a record or based on record type we need to conditionally execute some actions or display elements. 

By Using DataRaptor extract we can fetch the recordtype id or Developername. 

Three ways to fetch the recordtype id or DeveloperName
 
1. In DataRaptor Extract from extract tab choose RecordType and configure with filters 


In ReccordTypeName you can configure with your requirement, or you can create setvalue and pass the setvalue element name to the Datasource in DataRaptor like this you can reuse the DR.


2. We can write query on recordtype by using formula tab in DataRaptor.
For example, In the above screenshot by using Query function I'm getting recordtype id from Formula result path we can use that name in datajson, reference for other elements, conditional view.

3. Based on recordId (contextId) we need to get the recordtype of the particular record by using Dataraptor we can fetch the recordtype name or recordtype id.

For example, I'm passing accountid and fetching the account details and recordtype details related to particular record.









Comments

Popular posts from this blog

Vlocity Facts #01 | OmniStudio DataRaptors

Vlocity Facts #34 || Getting the details from the URL in a FlexCard and an Omniscript

Vlocity Facts #44 || Communication between Omniscript and Flexcard [Pub/Sub]