You need to sign in to do that
Don't have an account?

can any one give me the real time senarios on triggers ..(ie;how can i use it and where i have to use it) pls dont give me defintions..!!
can any one give me the real time senarios on triggers ..(ie;how can i use it and where i have to use it) pls dont give me defintions..!!
https://developer.salesforce.com/trailhead/module/apex_triggers
https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_intro
https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_bulk
This trigger adds a related opportunity for each new or updated account if no opportunity is already associated with the account. The trigger first performs a SOQL query to get all child opportunities for the accounts that the trigger fired on. Next, the trigger iterates over the list of sObjects in Trigger.New to get each account sObject. If the account doesn’t have any related opportunity sObjects, the for loop creates one. If the trigger created any new opportunities, the final statement inserts them. Please let us know if this will help u
Check below link for trigger concept .
http://manojjena20.blogspot.in/2013/03/manojs-trigger-blog.html (http://manojjena20.blogspot.in/2013/03/manojs-trigger-blog.html)
https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_intro (https://developer.salesforce.com/trailhead/apex_triggers/apex_triggers_intro)
Hey basically we are writting triggger in Object it may be standard or custom .Here you take one realtime example .
Assume we have a insurance claim obejct .Here we have one rule that when you have taken the insurance after 15 days you can claim the insurance .
Here we have two object one is Insurance and other is Insurance Claim .
So when you have created insurance after 15 days you can create claim.I think you are clear now about the requrment .
Try to create two object and add relationship between them and write trigger in child object .
2.Assume a simple example you need to send an email when you will create a account to any one of your company .
3.Write a trigger in Opportunity when your stage will close Own yoou need to add a chile object record related to Opportunity .
try with above requirment and let me know if you need any help !!
Thanks
manoj
Could you please provide me the solution for the scenario you had mentioned,
Thanks in advance !