enter image description here

Highlightes value should be displayed in the "Contractor associated to acpt bid" field Estimate is the parent and it has Bid Request as a child. In Bid request there is a field "Name" Above the "Bid Estimate" field, display the selected Contractor's name that is associated to the accepted bid."Accepted bid" is a pic list value.

  • 1
    What's your question? Which Child are you trying to find via a Lookup and what have you tried?
    – crmprogdev
    Commented Nov 29, 2016 at 14:40
  • I have to fetch the contractor name "Ernest Starr" .For this i have created a formula field and trying to fetch the value from there.But the problem is in Insert field i couldn't find the relation to Bid Request from Estimate object. Commented Nov 30, 2016 at 4:57

1 Answer 1


You'll want to go to Setup and search for Schema, then click on Schema Explorer. Once there, deselect everything, then click on custom objects and find your Estimate, Work Order, Bid Request and Contractor Objects. I'm guessing that Contractor will have also have a lookup to either an Account and/or a Contact. Schema Explorer will show you if that's the case once you click on those objects.

Generally speaking, you should have a Many to One relationship between Estimate and Bid Request, or at least that's what I'd expect. That would likely be a Master-Detail relationship but depending on who created the application, it could be something else (not what I'd expect, but I also don't know the other objects or all of the application).

There are several ways of querying this, each of which depends on where you want to start from. From looking at your screen captures, you should be able to write a query on the Bid Request that would look something along these lines to get the Contractor Object Lookup Id Record (from there, it would depend on what your schema looked like):

Bid_Request__c Request = [Select Id, Name, Contractor, Amount FROM Bid_Request__c 
   WHERE Name = 'BID-05512' && Amount__c = $3772.00 && Selected_Bid__c = true limit 1];

Be sure to check the object and field API names I've used above are correct since I've made some assumptions here that may not be accurate.

That should return the Id of the Contractor Record as the result that's contained in Request.Contractor. You could also query the above starting from the Estimate Object using either a __r relationship, as part of a Parent-Child query or possibly in a sub query. Again, I'd need to see your schema to know for certain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .