Phew!
I hope you guys had as much fun watching the webinars a we did presenting!
The turnout was amazing and shocked us all!
I literally read every single question and every single survey submission, word for word, multiple times.
Your words and stories have been incredibly inspiring, and I consider these things my biggest reward for putting time in this site. Thank you!
I’ll have summaries of each webinar posted soon:
These past few weeks have been some of the busiest yet most fulfilling weeks of my life!
David
Hi David
I am very much impressed by your tutorial and have been following very chapter. I want to write my first trigger. But am quite worried.
This is the problem that I have:
I have an asset on which we have 2 lookup fields . One is account and the other is contact. I am creating the asset from account so the relationship is created between account and asset.
I want to create the relationship between contact and asset too..
So basically I want that as soon as I save the record it should automatically populated the contact details.
I know the logic what i need to do but am worried I may get it wrong.
This is what I have created so far
Trigger CreateLookupContact on Asset (before insert,after update) {
Set AccountIds = new Set();
for (Asset a : Trigger.new)
AccountIds.add(a.AccountId);
Map owners = new Map([Select Name from Contact Where Id in :AccountIds])
Please suggest what have I done wrong and what do I need to do next.
regards
Lawrence
The biggest thing you need to solve is which contact to associate the asset to if there are multiple contacts on the account!
So at the moment, you query every contact associated with the account! Since you only have one lookup field to contacts on the asset, you need to choose only one contact per asset.
Once you figure that out we can move on =) Note that you probably don’t need to use a Map here, you can get by with just a List. No need to complicate things!
David
Hey David – Great job with the webinar series. I am going through the webinars (have already seen the first 2 – Get Started & Build on Basics). Looks like the recording for the 3rd one (Beyond the Basics) is still not up on the Developer Forum.
Any idea when is that going to be available?
BTW, I am also a NON-CODER (though doing SFDC consulting & implementations since last 8 years now). Have all the certs except the 501 and the prized CTA, so aiming to go for the CTA this year :)
Salesforce still working on #3 but it is definitely a big priority for them since there has been so much demand! Not sure when but that one did need more editing than the other two webinars =)
After CTA you need to round it all out with 501!
David,
Really appreciate all that you have done and will continue to do. Can you let us know when the final two seminars will be available?
Thanks
Chris
I’ll have them posted as soon as they’re up! Salesforce is still editing!
Although I couldn’t make it to the webinars, I will surely see them later on and follow through with the examples :)
Thank you VERY MUCH for your time and effort Dave!!
My pleasure, had a blast doing it!
Appreciate your work David.you are doing marvelous job. These are really good for learners.Hope we will get more number of topics as well like these..Keep going David.