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

learn more… | top users | synonyms

5
votes
4answers
364 views

Mandatory child record when creating parent record

The standard object Account has a master-detail relationship with a child object called Address__c. In the Address__c object we store the various addresses an account might have. My question is as ...
0
votes
0answers
13 views

Get a list of territory names and assigned rule names

In this child-to-parent relationship query, I am trying to show the territory rule name (MasterLabel) from the RuleTerritory2Association child object: select ...
0
votes
0answers
12 views

Running query on two levels of parents and resulting column is not showing up (no error!)

I'm running a child-to-parent query in Workforce such as this person did - Child-to-Parent Query - [object Object] is the result. However (in Workforce) I am not getting an error, the resulting column ...
1
vote
1answer
36 views

How to create relationship between Custom object and Contact Object using SOAP API C#

I have created a custom object in Salesforce named Call_c. There is already a standard object in Salesforce named Contact There is a field named call_number_c__c in my Call_c and MobilePhone field ...
2
votes
1answer
52 views

Invalid Foreign Key Relationship when retrieving from class

I've a parent object (Product) and a child (Inventory). I'm trying to retrieve the value of the child object from a class that I've created. public class DisplayProducts { private Product__c ...
0
votes
1answer
31 views

How can I to take a child object from a parent and add it to a list?

Sorry that this is such a basic question, but i could not find out how to do this, I do not want to create a query, which is what most of the solutions i find on the internet are. Example: ...
1
vote
1answer
18 views

Best way to handle relationships to objects I cannot create look ups for?

I have an object and it needs to have a 1 - many reference to the Data Category used in knowledge base. We have a requirement to be able to configure which data categories show up on a given page. ...
0
votes
1answer
11 views

how to get Activity associated with a contact?

i want to get activities associated with a Contact..how it can be done..as per my knowledge there is no any relationship between activity and contact..so how can i acheive this please do reply Thanks ...
2
votes
1answer
20 views

How can I present display-friendly relationships?

I am creating an order management system in Salesforce. I have created a custom object called MyProducts which has the following fields: MyProductId (An autonumber field - MP-0001) Product Name ...
3
votes
1answer
30 views

Are SObjectField tokens safe in cross-managed package calls?

We have some code and SObjects and fields in a managed package that works when executed by other calls in that managed package as your would expect. The code looks like this. private SObjectField ...
2
votes
0answers
40 views

Visual Workflow: fast lookup with cross object criteria

I've created a visual work flow that has a fast lookup. The lookup basically finds the Account_Share records that have a parent account id equal to a variable. I'd like to take this a step further ...
0
votes
0answers
23 views

Query for a child's parent's child's child

Here's my question. I am trying to grab information on my child's parent's child's child. However i am not sure of the best way to go about doing this. Does anyone have any advise. In sort I'm ...
-1
votes
2answers
59 views

Best way to query child, grandchild from parent

What is best way to display child, grandchild from parent or more than 1 level SOQL down. I tried to display grandchild of a parent record. Any reference would be great. Thanks
0
votes
1answer
25 views

Subquery returns parsing error

I am trying to fetch the currently logged in (customer portal) users details from their related contact field via SOQL. I have created what I believe is the correct SOQL statement however I am ...
0
votes
1answer
30 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
54 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
44 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
37 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
115 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
102 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
490 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
52 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
127 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
53 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
51 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
54 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
207 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
42 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
147 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
102 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
109 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
35 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
46 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
60 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
157 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
107 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
131 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
125 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
163 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
92 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
230 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
111 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
57 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
28 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
206 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
69 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
46 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
75 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
917 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 ...