function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc dev 2317sfdc dev 2317 

Number of approvals on quote object

Hello there,
I can see in related list there 2 Approvals on quote object. But how do I check in formula field (in quote object), that Approvals is not equal to null. 
User-added image
Best Answer chosen by sfdc dev 2317
sfdc dev 2317sfdc dev 2317
Hi Shirisha,

Thanks for your response. But I think its not possible to look for child (Approvals) records while creating a formula field on parent (Quote)record.
https://trailblazers.salesforce.com/answers?id=9063A000000E3OBQA0

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

Can you please try the below SOQL query to see the approval records:

SELECT Id FROM ProcessInstance WHERE TARGETOBJECTID = "record id here" ORDER BY CreatedDate DESC

Reference:https://salesforce.stackexchange.com/questions/205496/soql-to-pull-out-approval-history-records

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
sfdc dev 2317sfdc dev 2317
Hi Shirisha,

Thanks for your response. But I think its not possible to look for child (Approvals) records while creating a formula field on parent (Quote)record.
https://trailblazers.salesforce.com/answers?id=9063A000000E3OBQA0
This was selected as the best answer