You need to sign in to do that
Don't have an account?
SUMANTH ELLURU
Ability to have a new field on Opportunity that shows the total number of training days which is a total from the “Number of Training Days” field on the related Training Sessionrecords. here Oppurtunity is standardobject & Trainingsession is custom object
i want to relate Oppurtunity and Training session objects and the field No of Training Days in Training session record should be auto populated on No of training days field on oppurtunity standard object
If the relationship between Opportunity and TrainingSession objects is Master - Detail, you just need to add a Roll-Up Summary type field in Opportunity that can sum up the days from TrainingSession object.
If the relationship is Lookup, you need to add a Number type field in Opportunity and add AFTER INSERT , AFTER UPDATE trigger in TrainingSession object to populate the field in Opportunity.
Hope this helps.
if yes can any one help me
and i am not able to create master detainl relationship between oppurtunity and training session objects
I am not sure if there is another configuration option, but if you are interested in going with Lookup Relationship and Trigger way, here is a sample code.
I have used this trigger to update a Total Amount field in Account object from the Amount field in Opportunity object using the Lookup relationship.
You may need to replace the Opportunity references with TrainingSession and Account references with Opportunity before using it.
Hope this helps.