Saleforce Difficult scenarios

difficult scenarios salesforce :

1) Faced one scenario like i have one trigger on campaign object that will help to update campaign fieds first and then based on campaign fields update it will also update leads fields.
   Because there is a look up relation between campaign and leads. But for every campaign there are more than 1 lack leads assigned which is hit two governer limits.
                a) 10000 DML rows exception.
                b) Apex CPU time limit exception.
                As a work around have implemented one batch apex logic from trigger that will update 50 Million lead records whenever campaign fields update/insert.
                This implementation would avoid both 10000 DML & CPU time limit exceed exceptions.

2) Face one more scenario like all mangers would get email notification every day whenever the approval records didn't approved by manger and submitted date more than 10 days in pending status.
   As a work around have implemented apex logic that would get query all the criteria met records from process Instance object and store all the records in temporary table.
   Created one workflow email alert on same custom object that would get fire email to Mangers.

3) I have done purging activities which would purge Billions/Millions records based on created date and take a .csv back up on daily basis without manual work.
   As a work around I have implemented new batch apex that would get delete all the criteria meets and same records we are storing in document object as a .csv file.
   Storing all the fields speared by comma.

4) Faced one scenario like--I have many Question & Answer records created in Question_Answer__c Custom Object and all Q&A's same for four theaters(AMER,EMEAR,APJ,GC).
   I have created one dynamic page which will help to display all the records in single visual force page as a input components based on theater.

5) Approval process scenario-  Parent & Child relationship between Lead, Notes&Attachement object whenever lead having at least one valid attachment then only it would eligible for approval.
   As a work around created one trigger on notes&attachement object which will update/insert/increase parent temp field and we have too many approval queues based on criteria it will go for correct approval queue.

6) We have one scenario where if any user leave the company the same user would get inactive and we have some assignment rules been defined for each and every user that needs to be deleted.
   I have implemented one trigger scenario where it will do as soon as user inacitve from user object trigger witll fire and it will get deleted assignment rules objects reords but i am getting "Mixed DML" operation here.
   Becuase i am doing operation between setup objects and non setup objects. After that i decided to ran the code snippet using @future method and issue been resolved.

7) I have created one visulforce page where it will display all the lead history records and lead records in single visualforce page. There were many records and too many query filters i used and displaying the same result in visualforce page.
   But i started getting "max view state (135KB) reached".
   As a work around i removed some filds which all are not using in visualforce page and put transient keyword for all getters and setters.
   removed large getters and converted into normal list format and used try catch finally exception blcoks at final block i clearead the list of results.


   

Featured

What is Cryptography in salesforce and what are all the algorithms provided by them ?

A). It is a security protocal between two systems. Lets say we are integration two systems without any encrytion mechanism then hackers wil...

Popular