DAY Spent in hospital with Salesforce Community Groups
Today, when I woke up , got call from my friend. He said ,If you don't have any work , can you come to Hospital with Me ?..
I was about start my preparation as I do regularly,but couldn't deny his request. Left everything behind and went to hospital at 12PM.Doctors put him a saline for 3 hours and I had to wait for that longer outside the room.
Then ,How do i spend 3 hours? There comes our Salesforce Community groups.. someone was asking about trigger and scenario based question that every Aspiring Salesforce developer must know .
trigger :Requirement :Cascade delete through Apex Code with Condition Applied.
Whenever we delete Account ,related Contacts must be deleted and related Contact must be Primary contact (isPrimary checkbox =True)
Custom Field on Standard Object :
In conversation he said "IsPrimary " is custom checkbox on Contact, I have gone through his code,he didn't append suffix '__c' to Custom field .(1st correction )
领英推荐
Soql query :
For Loop Inside For Loop:
Again he posted other code of trigger.
KEY TAKE AWAY FROM TODAY