Saturday, 10 March 2012

Rollup Summary using Trigger

//Rollup summary using trigger on conatct
//This is used for  displaying the number of contacts on account

trigger countingcontacsofacc on Contact (after insert,after delete,after update) {
map<id,list<contact>> mapcontactcount=new map<id,list<contact>>();
map<id,Account> accupdate = new map<id,account>();
for(Account acc:[select id,(select id,name from contacts) from account]){
        accupdate .put(,acc);

for(id c:mapcontactcount.keyset()){
update accupdate.values();


No comments:

Post a Comment

Get Record Type Id from lightning component in standard new action override (getting any url parameter)

Hi , Here we have requirement to get record type id from lightning component when standard "New" action is overrided. To get...