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
Akshay PoddarAkshay Poddar 

Do we have any Declarative Approach For Dynamically Calling Apex Classes ?

I Have Multiple Apex Classes and i want to decide which Apex Class to Call on Run time Based on the Record Value.
I want to make a Generic approach for this, i already tried with Tightly coupled approch like comparing record value with something and calling Apex.
I can definitely accomplish this with the help of Factory Pattern Classes and Triggers. But Requirement is to have this in Declarative Approach.

Thanks

MagulanDuraipandianMagulanDuraipandian
Hi ,
Did you try Process Builder. Call the apex class from Process Builder based on the criteria(record value).
--
Magulan Duraipandian
www.infallibletechie.com
Akshay PoddarAkshay Poddar

Hi Magulan,

I already have this approach ready but it create more tightly coupled solution for identifying which apex class to call. As i need to modify process or flow every time new class come and compare it in process againt record value.

I want Factory Pattern Implementation for this using Declarative features of Salesforce.

 

Thanks For Reply.