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

learn more… | top users | synonyms

0
votes
0answers
9 views

Insert Contact then auto create an opportunity in NPSP

Good day everyone, My problem is something related on how NPSP works. Suppose I have 2 group of data, one is CONTACT and one is OPPORTUNITY. What I want to achieve is that I want to insert those 2 ...
0
votes
1answer
28 views

SOQL for Many to Many Relationship

I have a many to many relationship between Opportunity and custom_object__c with the junction object junction_object__c. Now I have to frame a query to pull all the related/attached ...
1
vote
1answer
15 views

Restore records from local backup using SOAP/BULK

I'm working on the restoring records for multiple objects that are stored in my local backup in the form of a database table. There seems to be an issue how the restore works. The scenario is as ...
4
votes
2answers
34 views

SOQL Query to retrieve Contacts from an Account sorted by the distance between the contact location and the account location

I'm trying to create a SOQL query to retrieve Contacts from Accounts, with the contacts for each account sorted by the distance between the contact location and the account location. This is what I ...
0
votes
1answer
17 views

To stop detail records deleted whenever master records deleted

Is is possible to stop the details records being deleted whenever corresponding master record deleted? If so can you pls provide solution.
0
votes
0answers
13 views

How would I set up this report?

I need to create a report that relates 3 objects. Account, Opportunity, And Lead. I am having troubles getting all the fields needed. Lead and Opportunity have a lookup to an account and it doesn't ...
0
votes
1answer
24 views

How to share objects with users in a many-to-many relationship?

I have a user to object many-to-many relationship and would like to give users read access to all objects that they are related to. In my data model there are three objects: User, Junction, and Foo. ...
3
votes
1answer
33 views

Find all records referencing a specific Account

What would be the best way to go about listing all the records that reference an Account? Lookup Ids aren't search indexed so SOSL turns up no results when looking for the Account Id and the only ...
0
votes
1answer
13 views

SOQL: Access Referenced object from a lookup field

I had an instance where I created a lookup field on a custom object (i.e. Sale__c) to reference an Opportunity, in which case this created a relationship for the Opportunity. Meaning I could now SOQL ...
0
votes
4answers
53 views

Updating a field with a value from parent during insert trigger

I would appreciate some best practice advice here - I have an insert trigger to populate a field in the record being inserted into a custom object with the value of a field in the parent object. ...
0
votes
1answer
33 views

Getting troubles with soql relationship in a custom object with a master-detail field

I have the next SOQL: SELECT Ap_Mat__c,Ap_Pat__c,Email__c,Cuenta__c,Nombres__c, Scheme__c FROM Asociado__c LIMIT 100 Where Cuenta__c is a master-detail field and Cuenta__c is the ...
1
vote
3answers
34 views

Polymorphic? Relationship to contact and user?

First post, but I think a valid question. I'm creating a family or household relationship between contact A and multiple contacts B,C,D... I am equally interested if a User E is also a family ...
0
votes
1answer
24 views

Collecting attendees onto Event Object

I want to collect the Attendees of events on to a custom text field on the Event object. I am running into issues collecting the names via the Event Relation. trigger EventAttendeeCollector2 on Event ...
0
votes
1answer
13 views

Salesforce report relationships

I have noticed there are 3 ways to get data across related objects into reports. 1.) Custom Report Types - you can create report types with a Parent Object and traverse down related Objects. 2.) ...
-1
votes
2answers
34 views

Nested queries with multiple objects

ust i am wondering why like this , and i know relationships are crazy many times in SFDC I have a query as below and getting results : select id,name,(select id,name from Batches__r)from ...
0
votes
1answer
20 views

field(check box) should be populate based on condition is related to other objects

I have the field in Devfull called Is Direct on the Account object. I need it populated under the following circumstances. For a Pending or Active Partner (using the Partner Status field on the ...
5
votes
4answers
260 views

How do Junction Objects - Many To Many Relationships - work?

I have read about many-to-many relationship in Salesforce and it is possible through Junction Object. That I got, but what I haven't got is that "How it works internally ?" Please help me to visualize ...
1
vote
1answer
19 views

Navigating lookup relationships with dot notations, to retrieve field values

I need to access the value from a roll-up field on my Opportunities, from it's related Opportunity Product. When I use oli.Opportunity.Software_Line_Item__c the value retrieved is always null. So ...
0
votes
1answer
16 views

How to enable one field based on another object field

For a Pending or Active Partner (using the Partner Status field on the Account), we need to look at all of their “Active” (checkbox on the Solution/Accrediation object) related Solution/accreditation ...
3
votes
1answer
32 views

What does the below statement mean?

I'm new here and currently i'm going through Salesforce tutorials. I found a statement as below: Multilevel master-detail relationships do not support division transfers. Can anybody make me ...
6
votes
1answer
191 views

Odd child relationship names

I have a object where the child relationship name is R00NR0000000Q8eeMAC instead of something more descriptive. How did that happen? Could it have been because the developer was working in Eclipse ...
1
vote
2answers
81 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
159 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
48 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
215 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
66 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
76 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
40 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
72 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
245 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
130 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
78 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
41 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
68 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
81 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
198 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
57 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
29 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
66 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
67 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
289 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
59 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
91 views

Relationship between Opportunity and Contract

How to make a relationship between contract and Opportunity ??
1
vote
4answers
126 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
34 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
75 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
45 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 ...
5
votes
2answers
583 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
39 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
59 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 ...