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

learn more… | top users | synonyms

0
votes
0answers
20 views

Apex SOQL Relationship [duplicate]

I often come across scenarios where i have two objects related through lookup / master - detail relationship. I need to find using apex and SOQL that for each parent record, these are the number of ...
1
vote
2answers
48 views

Can Many to Many relationship be achieved using lookup relationship?

My question is... We normally create master-detail relationship to achieve many to many relationship. Instead of using master-detail relationship on junction object can i use lookup relationship to ...
3
votes
2answers
79 views

Multiple Many To Many Relationships on same Custom Object

Forgive me, I just started Salesforce development this week so I don't know many of it's methodologies and idiosyncrasies yet. Let's say I need a Custom Object to represent computer parts ...
1
vote
2answers
31 views

Is there any way to insert data into a lookup field without an associated relationship sObject until the real data can be inserted?

How can I programmatically create an object with a lookup field to an object that would be added at a later time? Is it possible? If yes, what is the best way to do it? I would like to use this to ...
1
vote
2answers
74 views

How many master-detail relationships per object?

All I see online is that each object can have 2 master-detail relationships, but on the Salesforce App Limits PDF : https://na5.salesforce.com/help/pdfs/en/salesforce_app_limits_cheatsheet.pdf It ...
2
votes
1answer
47 views

What does this error mean - SOQL statements cannot query more than 35 different parent types?

From the Spring 15 Docs, I found this info under Relationship Query Limits: No more than 35 child-to-parent relationships can be specified in a query. A custom object allows up to 25 ...
2
votes
1answer
50 views

Send email alert to Account lookup fields, based on Opportunity Criteria

I'm hoping someone can help me with this dead-end I've gotten myself into. Here's the use case: There are two lookup fields on the Account object that pull a User in our org: "Business Consultant" ...
0
votes
1answer
28 views

Lookup filter on a junction object [closed]

I need to make a lookup on Object A that looks up on the Contact object. Filter Criteria: Object A has an event attached to it. The event has a list of contacts. How can I create a lookup filter ...
1
vote
2answers
47 views

Handling Related List Security in Override VF pages

We have created an Override VF page for an object (for e.g. "Parent Object"). There is an object (for e.g. "Child Object"), which has lookup relation ship with "Parent Object". On Override page we ...
1
vote
2answers
93 views

Multilevel SOQL Query (Parent to Children) more than 1 level

I am trying to get some related contact information from a SOQL query but have run into the error "SOQL statements cannot query aggregate relationships more than 1 level away from the root entity ...
1
vote
1answer
79 views

Retrieve all ContentDocument Ids whose related ContentDocumentLink record is updated/added

I want to retrieve File Ids for which new entry has been added or removed from child ContentDocumentLinks relation. Following is the parent to child relationship query I made for retrieving Ids, title ...
2
votes
1answer
53 views

Child object with two parents - will child still exist if if I delete one parent?

I have doubt in the Parent-child relationship .Suppose I have scenario where an object is in a relationship with two parent objects. In that relationship if I delete one parent object, will the child ...
1
vote
1answer
34 views

SOQL: Differing results when adding a relationship field

I'm experiencing something strange with my SOQL results. Our salesforce has a custom sObject named Deals__c and an intermediary object, contact_deals__c which solves the m2m relationship between ...
1
vote
2answers
42 views

How to use the child objects in a related list after a soql call in Visual Force

My org has an account object with a related list of Contacts. I am querying for the Contacts from the Account and want to use the data on the Contact object. How can I access fields from the contact ...
4
votes
3answers
67 views

SOQL: Returning results where detail (M-D) count is at least 5

I'm trying to set up a query that will return which contacts have over 5 deals with us. We have a custom sObject which is (terribly) named, contacts_deals__c which serves as an intermediary table ...
0
votes
2answers
89 views

Displaying Contact Roles Related List for Parent Account on Custom Object

I'm trying to build a Visualforce page that will display Contact Roles for the parent Account of a custom object. My class and page tags follow. I'm not receiving any errors at this time, and the ...
0
votes
2answers
40 views

Didn't understand the relationship AccountLocations__r

I have got two objects Account and AccountLocation__c with a master-detail relationship where AccountLocation__c.Account__c references Account.ID. Manual check does confirm the relationship. The ...
2
votes
2answers
26 views

“Outer join” like reports

I have a parent and child object. I want to create a report for these objects. I can create a report type for the objects. Now what I want is that for every child object, there is one row in the ...
2
votes
0answers
49 views

Unable to retrieve related records in Test Class using SOQL

The following SOQL in test classes gives a list of contacts but it doesn't lists any related account fields. List<Contact> contacts = new List<Contact>([Select Id, Email, AccountId, ...
0
votes
2answers
46 views

Child Relationship Query Not Working

I have a trigger that I am trying to update the custom object (Share_Reference__c) within the Account object. For some reason my query in List accounts isn't working, saying that it didn't understand ...
6
votes
1answer
168 views

How to identify relationship type (Lookup / Master detail) from the field api Name in APEX?

I have requirement in which i iterate through all fields of sObject and needs to identify fields which has master detail relation ship only and then get that (Reference to)object name and then further ...
0
votes
1answer
37 views

SOQL join query between child-parent related objects

I have the following relation between objects: Group__c AsociationGroupOrder__c Order Account Id <------- Group__c Format__c Pedido__c -----------> Id ...
0
votes
1answer
63 views

Relationship between Opportunity and Contract

How to make a relationship between contract and Opportunity ??
1
vote
4answers
64 views

Is it possible to trigger a workflow outbound message when a custom related list item is added or removed?

Excuse my ignorance in all of this. I'm not well versed in Salesforce and I've been tasked with building an integration with a web app. I've hit a brick wall on things to Google to find a solution. ...
0
votes
1answer
30 views

Relationship query - child that fetches its parent with all its children

I have a custom object rstk__poline__c that has a child yo parent relationship to rstk__sylocid__c. The parent object (rstk__sylocid__c) also has a parent to child relationship with rstk__sylocnum__c. ...
1
vote
1answer
55 views

Parent account field determine child account field values

I have a custom text area on Accounts called Geographic_Locations__c. In this text area, I list various US cities, each on their own line. What I am looking to do is to have each line of text ...
1
vote
2answers
41 views

Relationship problem and 'Illegal Filter on Attachment'

I have a query like this: SELECT ParentId FROM Attachment WHERE Parent.Type = 'Contact' When testing with an account, I get an error saying: [MalformedQueryFault [ApiQueryFault [ApiFault ...
4
votes
2answers
236 views

Is it possible to convert a Master-Detail relationship to a Lookup?

I'm going through the Trailhead training (here), and see the following two snippets which seem to disagree: "It’s possible to change a lookup relationship to a master-detail relationship, but ...
0
votes
1answer
31 views

How do I determine the relationships between custom objects?

Sorry if this has been addressed before, but I could not find a thread that was asking this. Background: I have limited OO programming experience in VB, Java, Python, etc. I am a Super User on ...
1
vote
1answer
35 views

UI approach for linking child records from the parent view page

Imagine an app using Account and Contact records. Both can life without another, but on Contact there is a lookup to Account. If you want to link a Contact to an existing Account using Salesforce.com ...
1
vote
1answer
66 views

Data Relationships, Data Filters and Automation Studio

I've created a User-Initiated Email that is using a Data Filter. That Data Filter is using a Data Relationship. When I try to fire an email send via Automation Studio, the job sits there running for ...
1
vote
2answers
189 views

Error: Didn't understand relationship 'Contract__r' in field path

So I have read other responses to the error like mines but nothing seems to fix the issue maybe someone can look at my code and help. I have in my controller class (trying to do an add and delete ...
0
votes
2answers
71 views

Relationship queries (parent-child)

I am new to Salesforce and I am struggling to get my head around the correct SOQL which correctly reference multiple tables. Some background: I have a custom field in Order Product called Teacher_c ...
1
vote
1answer
75 views

Workflow Creates Tasks not Related to any Records

I am the admin of an Org that I created a workflow for. The workflow is designed to create Follow Up tasks for the Sales users. I am getting a bunch (not all) of the tasks that have no record ...
0
votes
0answers
21 views

Master detail filter on transaction object based on M-D relation of master data

I have two custom object having Master detail relationship. These objects contain master data in my org Say Challenges and Actions. Here Challenges is master and Actions is detail object. Now i have ...
0
votes
1answer
59 views

Variable does not exist in relationship SOQL

I tried the following SOQL and tried to use the ProductCode but getting the error as given below. for(PriceBookEntry pbe: [Select p.UseStandardPrice, p.UnitPrice, p.ProductCode, p.Product2Id, ...
1
vote
1answer
44 views

Single query: fetch non empty folders

I'd like to know if it is possible to write a single SOQL query to pull all the Document Folders (I need only folder id) which are not empty.
0
votes
1answer
53 views

Display all the records instead of related record in a visual force page

I have a custom object as " gmod__Opportunity_Forecast__c " it has a look up relation with "product" object and api name is give as "gmod__Product__c". 1)Im querying on "gmod__Opportunity_Forecast__c ...
0
votes
1answer
82 views

Opportunity product and Quoteline item have the same behaviour

Can any one let me know .Opportunity has relatinship to opportunity product and quote object .Do opportunity product and quoteline item are related or do their have same behaviour or if different what ...
0
votes
1answer
44 views

Walking relationships in email templates in a workflow

I have a custom email address field on Account called Primary Email Address. We have also created a custom object off of account called Purchases. I want to be able to send an email to the Primary ...
6
votes
4answers
505 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
80 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
18 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
107 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
263 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
39 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
25 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
18 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
21 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
34 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 ...