Use relationships to associate an object with other objects in Salesforce.

learn more… | top users | synonyms

0
votes
1answer
27 views

Relationship objects from the current object

I have 3 objects A, B and C. And B and C have lookup to A. I want to find all the objects which have lookup to the object A. I am able to get all the Child Relationships (using ...
2
votes
1answer
29 views

How to find object relations with the schema builder?

If I have 5 objects that are interrelated. How do i find their relationship (parent to child or child to parent) using the schema builder ? As of now i can see the relationship chart only if i know ...
0
votes
2answers
33 views

GetChildRelationships not finding contact lookups for custom object

I have a custom object with many custom fields. Some of these fields are lookups to contacts. I have a visualforce page on which I need to list all contact fields for this custom object. I am using ...
1
vote
1answer
22 views

Get Contact info and CampaignMember status in one query

Is there a way to retrieve contact information (first name, last name) and campaign member status for all members of a campaign in one SOQL query? I know you can get just the contact information with: ...
1
vote
2answers
61 views

Is it possible to have more than 2 many-to-many relationships on an object?

Since we are limited to two master-detail relationships on any given record, is it possible to have more than 2 many-to-many relationships for a given object? This seems like a rather large ...
2
votes
0answers
59 views

Using a Lookup Relationship in a Formula Field

I want to update a field on the the account object based on a field being updated on the contact object, in this case a date / time field. So far, I have setup a lookup relaionship field on the ...
2
votes
2answers
343 views

What is wrong with my relationship?

I'm trying to use SOQL 'relationships' between two tables. I follow this example and it works fine: SELECT Account.Name, (SELECT Contact.Name FROM contacts) FROM Account from: ...
0
votes
1answer
33 views

Error: Invalid field Job_Application__r for SObject Position__c

I have two custom objects those are position and job application objects,those are related by lookup relationship.But when try to access the job applications through relationship I m getting above ...
0
votes
4answers
52 views

How To Retrieve the Related List Data?

I have a Object called SiteContracts__c and it has a Related List Object is Engineer_CheckList__c", now I want to get the Engineer_CheckList__c record which is related to SiteContracts__c how can I ...
1
vote
1answer
37 views

Relationship should be given to Opportunity or Product

I have created a custom object as CustomlineItem and wanted to give a lookup relation to opportunityline item .So i should create the lookup relationship with opportunity or product ( ...
0
votes
0answers
31 views

custom object Lookup relation should be given to OpportunitylineItem or opportunity product

I have created a custom object as OpportunitylineItem and wanted to give a lookup relation with standard opportunityline item .So now i should create with the opportunity product or standard ...
1
vote
1answer
38 views

What is the Relationship b/w Opportunity products and opportunity Line Item

can any one help me out .What is the relation ship b/w Opportunity Products and Opportunity Line Item.Are their same or different in their behaviour.Any help is very much appreciated.
2
votes
1answer
72 views

Updating a field in one object with the value from another a field in another object

I have searched and tried come up with a solution but I just can seem to do it. I am new to APEX in SF and what I thought was going to be simple I just can't seem to get to work. I want to update a ...
0
votes
0answers
26 views

Relating additional objects to my custom report type

I have created a new report type which links Process Instance and Process Report Node together so I can view approvals on my Opportunties in my report. This method works, however only the Opportunity ...
2
votes
1answer
80 views

SOQL Relationship Query : Compare Child and Parent field value in WHERE clause

Is it possible to compare the Child and Parent field values in a Single SOQL Relationship Query ? say get me all contacts for an account which doesn't have same name as its parent account. SELECT ...
1
vote
1answer
53 views

How do I restrict the ability of a user to edit and delete an object, but allow them to be edited via another object?

How do I prevent a user from being able to edit and delete records directly in an object, but not through a master-detail relationship that is related to the same object? For example, We have 3 ...
2
votes
1answer
92 views

Junction object confusion

I have 3 objects order, order_lines and shipment_lines . So order has many order lines and many shipment_lines. So I want to display order_lines and shipment_lines fields on a single related list on ...
3
votes
1answer
28 views

External SalesForce Forms

Is it possible to create external SalesForce Forms that can populate fields in the same way as inside salesforce? We offer online teaching and the idea is that teachers, after every lesson, can fill ...
3
votes
1answer
42 views

Mandatory to create Junction object?

I have attached a screenshot of the schema. I have order, order_lines and shipment_lines related as in the following picture... Is it mandatory to create a junction object to get shipment lines for ...
1
vote
2answers
55 views

Tally the number of items in a related lists on a related object

Hi guys I am a complete n00b with SalesForce.com, so please forgive me if my question is too basic, but I have been trying for about 2 days now and I feel like I am getting nowhere I have a database ...
3
votes
2answers
96 views

Multiple Contact 'types' on a Custom Object: Model with junction object or specific lookup relationships?

Probably a general schema design question: I have a Custom Object that will have several related Contacts. The contacts are grouped into types, for example "Agents", "Applicants", "Referees", etc; ...
2
votes
1answer
86 views

How to preserve relationships upon data import?

I've set up lookup and master-detail relationships between objects in Salesforce, and I have SQL-exported CSVs of legacy data which mirror these relationships. How do I preserve the existing ...
1
vote
2answers
79 views

Relate records from the same custom object

I have a custom object called 'Events'. I would like to create a relationship that allows Event records to be related to other Event records. Is this possible using standard customisation?
4
votes
3answers
95 views

How to use Name Object

I am using the Java API and trying to create an Attachment with a reference to the Parent external Id field. The setParent() method takes a Name object as the parameter. For what I read, the Name ...
0
votes
2answers
135 views

Access data in Visualforce/Formula fields through Custom Junction Object [duplicate]

I have three custom objects: Entity, Residency, and Address. Entity and Address have a many-to-many relationship; Residency is the junction object (two master-detail relationships.). Is it possible ...
1
vote
2answers
67 views

Is it possible to have multiple parent with one child relationship in Salesforce?

I have one object that contains fields that stored decimal and it already have Account as parent object.Because I want to Roll up Summary to do calculation on that (SUM) those field,I need to create ...
4
votes
4answers
162 views

Trying to get a SOQL query with no duplicates

EDIT: Is there a way where I could just loop through my list and remove the duplicates? It should be easy but I've been having trouble with it. I have tried a bunch of different methods of getting ...
2
votes
1answer
79 views

SOQL Query to count only Accounts with Opps in both this year and last year?

So rather than create an Apex class, run multiple queries then write some code to figure out the answer, I thought I'd take a stab at writing a complex query that would get me the answer I'm looking ...
3
votes
2answers
45 views

Is it possible to get the “type” of object you're querying in a SOQL relationship query

For example, in the standard Salesforce Event object, I'd like to do the following with the WhatId field. select what.name, what.type(?) from event where id = 'myid' However, this will only work if ...
0
votes
1answer
27 views

Help with formula field needed

The population of ABC fields depends on field__r.Account__r.Name field. I want to assigned ABC formula field with field__r.Account__r.Name value if field__r.field__c is blank, but if there are some ...
2
votes
1answer
108 views

Are lookup fields on the User object (e.g. to Contact) supported by the platform?

Aim – i need to have a lookup field on the user object which looks @ the contact object and only returns values where the email address is @domain.com Now i am under the impression that no lookups ...
2
votes
0answers
60 views

What is the logic for the automatic creation and update of custom report types?

It seems there is a lot of magic behind custom report types. For example, if I create a new master detail field to the account object for "Custom" a new report type "Accounts w/Custom" is created ...
2
votes
2answers
40 views

Do I have to manually call an update in a trigger for an object the trigger is NOT on?

I've noticed in triggers it is not necessary to use CRUD calls as it is in apex classes. However if I am updating a field on a different object to the one the trigger is on, do I need to do it then? ...
1
vote
1answer
70 views

Need Help on Cross Object Look Up Field Update

I finally have the Ids query corrected(after 20 years); Select (Select ParentA__c From ChildA__r) From ParentB s WHERE Id IN (Select s.ParentB From ChildB s) I now have the IDs I would need to ...
2
votes
1answer
675 views

Relationship between Account and Opportunity and Account and Contact

On Opportunity there is a lookup relationship to Account.But why it behaves as Master-Detail as we can create Rollup Summary Fields on Account. Similarly if we delete Account then Contact gets ...
2
votes
1answer
17 views

How to view inbound relationships

Working with a very large and complex salesforce setup, we have a custom object with several lookup fields to external objects. These are easy to check. I was hoping there would be an easy way to ...
2
votes
2answers
589 views

Related Object Fields in custom button (URL Hack)

Having a real brain freeze here. I am using some URL hacking to auto fill some fields on a custom object. USE CASE I have a custom object 'Operations Action' that is related to a case. My Case ...
0
votes
1answer
28 views

Selfrelationship of account

How to define self relationship in salesforce explain how can i create self relationship in salesforce. I know salesforce doesn't provide out of the box this relationship. My Scenario is i have a ...
0
votes
1answer
40 views

Understanding ChildRelationship object

I am using the C# web-service to get data from salesforce, After calling the "sforceService.describeSObjects()" function, I am running on the object and get they ChildRelationships. For example, I ...
1
vote
3answers
673 views

How to get nested children records more than 1 level deep via SOQL

I want to get the account child (contact) and contact child. account contact contact contact etc., I HAVE TRIED FOLLOwING CODE: List<accont> acc = [select id,name, ...
1
vote
1answer
60 views

Is it possible to use SObject Formula fields to get arbitrary values stored in some other SObject?

Let's say I have some SObject (myCode__c) with three string values (e.g. key1__c, key2__c, and code__c). The combination of key1__c and key2__c should be unique. Let's say I have a second SObject ...
1
vote
1answer
460 views

How to default parent fields when displaying new child object VF page

I have created a custom lookup field on the Order object to the Opportunity because we want to create Orders from Opps and not Accounts. I have also created a Visualforce page for Orders and am ...
2
votes
1answer
84 views

Better way to fetch a User field from the a record's ownership?

Sorry if this has been asked before, but I feel that there has to be a simpler way to get a User field from the Owner relationship. I'm currently looping through 2 lists and then mapping the objects ...
2
votes
2answers
366 views

How do I return Manager name instead of ManagerID in a SOQL query?

I am running the following query: SELECT Name, ManagerID FROM User The result yields a User's name and their corresponding Manager's user ID. How can I return the Manager's name instead of the ID ...
1
vote
3answers
250 views

Error counting Child records

I have a parent object Feedback that has multiple Feedback_Comments as child(lookup). I have counted total Feedbacks grouping by name. But I'm unable to count the childs grouping by name. Here's what ...
4
votes
2answers
500 views

SOQL Outer Join Multi Level Master Detail Relationship

I am working with a 3 Level Master Detail Object Relationship: "Level 1" has "Level 2" detail records "Level 2" has "Level 3" detail records I am trying to Query "Level 1 records" and using an ...
1
vote
1answer
429 views

How to link Single Contact to Multiple Account?

How can we link single contact to multiple Account. I have seen many links related to this issue but couldn't get any idea. Is there any work around for creating multiple Account for single Contact. ...
1
vote
1answer
72 views

Is it possible to automate junction object creation?

Example use case: I have three objects: Order, Item, and OrderItem. OrderItem is the junction object that relates Orders to Items (because an Order can have many Items) and Item to Order (because an ...
1
vote
2answers
97 views

Trigger to update grandchild records

How do I update a grandchild's field if there is a change in grandparent field? I know I have to write a trigger because its cross object I can access the immediate child record of parent which is ...
1
vote
1answer
820 views

Accessing child records in visualforce

I have an object Feedback_Comment__c which lookups to Feedback__c. How can I access "Feedback_Comment__c" fields in a datatable column? I could pull all Feedback__c fields like this... ...