Blog

1. Test class must start with @isTest annotation if class class version is more than 25
2. Test environment support @testVisible , @testSetUp as well
3. Unit test is to test particular piece of code working properly or not .
4. Unit test method takes no argument ,commit no data to database ,send no email ,flagged with testMethod keyword .
5. To deploy to production at-least 75% code coverage is required 
6. System.debug statement are not counted as a part of apex code limit.
7. Test method and test classes are not counted as a part of code limit
9. We should not focus on the  percentage of code coverage ,we should make sure that every use case should covered including positive, negative,bulk and single record .

  • Single Action -To verify that the the single record produces the correct an expected result .
  • ... Read more »


Select Product__r.Id, Product__r.Name, Product__r.Category__c 
FROM Order_Lines__c 
WHERE Order__r.eWinery_Date_Completed__c = LAST_N_DAYS:365 
AND Order__r.Status = 'Completed' 
AND Product__r.Category__c = '' 


Hello:

  1. will be out of the office in meetings and may be slow to respond to your email. If this is an urgent matter, please text or call me at 925-519-1848.

 

Susan

 

 

 

Hello,

I am currently out of the office ill, and will not be checking email or voicemail. My regular office hours will ... Read more »



OLI: 

Select Id, Bill_to_Email__c FROM Order_Lines__c 
WHERE Order__r.Bill_To_Brand_Contact__r.System_delete__c = true

 

Order:

Select Id, Bill_To_Brand_Contact__r.System_delete__c 
FROM Order where Bill_To_Brand_Contact__r.System_delete__c = true

 

Cases

Select Id FROM Case WHERE Contact.System_delete__c = true

Contact:

Select Id FROM Contact where System_delete__c = true

 

Outdated orders of non CMs

Select Id, eWinery_Order_Date__c FROM Order_Lines__c 
WHERE Order__r.Bill_To_Brand_Contact__r.Has_being_a_club_member__c = false 
AND Order__r.eWinery_Date_Completed__c < LAST_N_YEARS:5

***

list<order_lines__c> oli= [Select Id FROM Order_Lines__c 
WHERE Order__r.Bill_To_Brand_Contact__r.System_delete__c = tr
		
		... 
		
			Read more »
		


Select Id, Brand__r.Name, Email FROM Contact where (RecordTypeId = '01244000000DHd5' OR RecordTypeId = '012E000000066Vl') AND (Brand__r.Name = '' OR Brand__r.Name ='' or Brand__r.Name ='')



Cascade of deletion:

  1. order line items
  2. orders
  3. contacts
  4. accounts

Accounts

Accounts no Contacts
select Id,name from Account where Id not In (select AccountId from Contact)

or

list<Account> s= [select Id,name from Account 
                  where 
                  Id not In (select AccountId from Contact)
                  AND Id not In (select AccountId from Case)
                  AND Id!='001E000000CaEySIAV' AND ID!='001E000001dOqGbIAK'
                  LIMIT 200];
delete s;

Contacts

Contacts (Basic filter)

Select Id FROM Contact WHERE ((LastName=' ... Read more »



Hello %BrandName% Customers,

We’ve just realised that we’ve pre-emptively sent out an empty marketing email. This should have reached you tomorrow, with information about a flash sale starting on Thursday.

... Read more »




Dear %username%l,

Yesterday it happened; that thing all marketers dread, a mistake. We sent an email intended for a small, targeted audience. Unfortunately, we sent it out to a few extra people, you included. So, if you received a message from us with the subject line: “Increase enrollment by reaching education focused parents” and you were wondering why, now you know. 
... Read more »



« 1 2 3