• Anthony Giuliano
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hi, I'm a new salesforce admin, with no experience in any of this, but I was hoping someone could point me in the right direction.  I'd like to create a data entry page that a user could get to from any account record.  The page would show all the account fields, and then have a section for contacts.  This section should show all (or certain) contact fields for each related contact.  The user would be able to enter all the contacts' info on this page.  Below that, the same thing for opportunities.  All (or certain) opp fields for the user to edit for each related opportunity.  Bonus points if you could also create new contacts / opportunities from this layout without a page refresh, but I understand that might be more complicated.

I cant believe this kind of functionality doesn't come out of the box with SF.  If anyone could help in any way it would be much appreciated.
I was hoping for some suggestions on how to iterate over opportunity record's child object to get a summarized total from the opportunity child record if a date on that child record meets the criteria of 02/01/xx (year would be current year).  If no records on the child fall in the 02/01/xx then I need to look at the prior year's opportunity child record and get it's 02/01/xx (last years) summary total.

This is what I have in my mind from concept.  Using batch apex, I am getting all the opportunities that fall in the date range that the business requires as current opps.  I used those ids to build a aggregate on the child records to get the summary totals and the child date 02/01/xx.  If it exists I get that summary and put it on the opportunity parent record.

The part I can't figure out as of yet is how to handle getting the last years child summary on to the current years opportunity when the above does not have a 02/01/xx (current year records on the child object).  What I was thinking is another job that would run after the first (described above) and this time get the current years opportunities but only if the field that I wan the summary to be on is blank.  That would give me all opps that didn't get the summary total for the 02/01/xx records on the child object.  But some how I have to the prior years opportunities so that I can get to the related child records to get the summary of the 02/01/xx (last years date on the child records) and put that total on the current years opportunity that is also related to the same account record.

Any ideas on a best approach for something like this?

Does the Opportunity Stage History object have any link to the opportunity? When I look in the schema browser in Eclipse and do a query on the Opportunity Stage History I don't see any link to the Opportunity that the history record is associated with.I need to query that object in Apex but I don't see a way to know what record is assocated with what opportunity.

 

Please let me know if there is something I am missing

 

Thanks,

Chris