• MrKen
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hello, I'm running into some trouble trying to build a custom report type.  What I have are three objects:

 

-Opportunity

-Opportunity Contacts (like contact roles; master lookup to opportunity)

-Application (master lookup to opportunity)

 

Is there anyway I can report on all 3??  

 

i.e.:

 

Opp 1, App 1, Contact 1

Opp 1, App 1, Contact 2

Opp 1, App 1, Contact 3

Opp 2, App 1, Contact 1

Opp 2, App 1, Contact 1....etc? 

 

This seems really simple but I can't find the right way.  Please Help...Thanks in advance  :)

 

Ken

 

 

 

  • April 14, 2011
  • Like
  • 0

Hello,

 

I searched around the forum/documentation to do this simple trigger update but didn't find anything.

 

What I have:  2 objects-  Site Location & Opportunity.  Site Location has a lookup to the opportunity.  

 

What I'm trying to do: Since every opp in our instance should have a site location, I'd like for a site location to be automatically created (and linked) everytime a new opportunity is created.  

 

Here's my code that I have so far: 

 

 

trigger createSiteLocations on Opportunity (after insert) {

for (Opportunity opp : trigger.new) {
	
		Site_Location__c sl = new Site_Location__c();		
		
		insert sl;
	}
	
	
}

 

This is not working...any ideas/help?

 

 

  • April 12, 2011
  • Like
  • 0

Hello,

 

I searched around the forum/documentation to do this simple trigger update but didn't find anything.

 

What I have:  2 objects-  Site Location & Opportunity.  Site Location has a lookup to the opportunity.  

 

What I'm trying to do: Since every opp in our instance should have a site location, I'd like for a site location to be automatically created (and linked) everytime a new opportunity is created.  

 

Here's my code that I have so far: 

 

 

trigger createSiteLocations on Opportunity (after insert) {

for (Opportunity opp : trigger.new) {
	
		Site_Location__c sl = new Site_Location__c();		
		
		insert sl;
	}
	
	
}

 

This is not working...any ideas/help?

 

 

  • April 12, 2011
  • Like
  • 0