GithubHelp home page GithubHelp logo

vimaltiwari2612 / salesforceapexutilites Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 9.0 113 KB

Collection of Classes that uses Apex standard APIs like Schema or Describe and return results dynamically. Also, some Architectures and Frameworks using Apex

Home Page: https://vimal-tiwari-sfdc.herokuapp.com/

Apex 100.00%
apex salesforce visualforce schema salesforce-developers salesforce-api salesforce-apex salesforce-lightning-components salesforce-lightning salesforce-rest-api

salesforceapexutilites's Introduction

SalesforceApexUtilites

Many times, we came across such scenarios, where we need to use Apex standard APIs like Schema or Describe, and we end up searching the code on the Internet.

Here is a Util class, that you can deploy in your org and use it whenever needed. Also, add new methods in it, if required.

The class had All the bulkified versions of all methods too.

https://medium.com/elevate-salesforce/salesforce-apex-utilities-fe11692a9288


Trigger Framework POC

Complete Details :

https://medium.com/elevate-salesforce/apex-trigger-framework-a-generic-way-to-join-tigger-contexts-46c4d9277db0

This Framework is beneficial when we have more than one triggers on any object. This Framwwork will help us to keep only one trigger on an object irrrespective of different packages and business use cases

Developers extend "AbstractTriggerContext" class, and override necessary methods which are needed. Then they need to register their classes in a Custom meta data with the context and operation type

Framework Overview

The idea is to join all the trigger contexts of similar types, together. For example, all BEFORE (INSERT/UPDATE/DELETE) will run together, doesn’t matter, it’s a package trigger or custom trigger logic added by customers.

Trigger idea

Architecture Overview

Image

Custom Meta Data details
1. Class Name : Name of class
2. Context : Before/After
3. operation : delete, undelete, insert, update
4. object name : for which object you want to run given class code
5. Is Active : to enable /disable trigge logics


Usage : Sample Account Trigger
trigger AccountTrigger on Account (before insert, after insert) {

        AbstractTriggerContext.run('Account',Trigger.operationType,Trigger.new, Trigger.old,Trigger.newMap,Trigger.oldMap);
}

salesforceapexutilites's People

Contributors

vimaltiwari2612 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.