The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [relationships]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

owner change in case with child record relationship master detail

I am changing the owner of the case and I have a master-detail with viewed notification object.everything is working fine .the problem is in changing the owner of the case does not transfer the viewed ...
0
votes
0answers
8 views

Can I add a column to list contact affiliations in a report?

Using the Nonprofit Success Pack I'm working on a "Contacts with Relationships and Related Contact" Report. Because the Primary Affiliation acts like a field on the contact I'm able to easily add it ...
0
votes
0answers
15 views

Filter picklist values based on other objects field values

Is it possible to filter picklist values based on the 2 other object fields relation? In that case I mean for example: I have an Order Type field which on junction object is related to Region (e.g. ...
2
votes
1answer
48 views

SOQL for Winter 20 Where is this used functionality

Hi I would like to know how I can query the "Where is this used" relationship via SOQL. Generally, Metadata information on Fields can be found in FieldDefinition and Entity Particle tables, but can ...
0
votes
1answer
20 views

Nonprofit Success Pack (NPSP): Filter Group

I'm attempting to create a rollup summary on the Account Object for related a field on related Contacts. I'm using NPSP-Customizable Rollup-Filter Groups. The end result will be the combined weights ...
2
votes
2answers
59 views

SOQL Join Opportunity, OpportunityLineItem, and Custom Object

I'm trying to join two standard objects, and a custom object. I need to join OpportunityLineItem, Opportunity, and MyObject. All tables have references to each other. MyObject has ...
0
votes
1answer
26 views

Is there a way to get a list of parent objects from a child object query?

I have a problem. I need to be able to return properties if they have opportunities in "test". There isn't a relationship from property down to opportunity. But there is a relationship from ...
1
vote
1answer
20 views

How to find easily the correct order of object for records deletion?

I have around 47 objects and need to delete records from these objects but these objects are related by master-detail and lookup relations. I have to go through relation of each of these objects to ...
0
votes
1answer
27 views

Didn't understand relationship 'Orders' in FROM part of query call [duplicate]

I have a problem to attempt to the Order object based on the custom Contact lookup. I use the query: select Id, (select id from Orders ) from Contact and the object looks like that: The error is: ...
0
votes
1answer
61 views

Upsert using relationships

I have a custom object Relation__c which has two fields a__c and b__c both are lookups to the standard Account Object. The Account object has an external Id field called z__c If I have to use Bulk ...
7
votes
2answers
110 views

Are the related objects in an SOQL query shared?

I have an SOQL query between two custom objects, let's call them A__c and B__c, where A__c has a Lookup field called B__c that references a B__c instance and B__c has two fields X__c and Y__c like: ...
0
votes
0answers
10 views

Why an user cannot create a master-detail relationship in which the User or Lead objects are the master? [duplicate]

Why any standard object cannot be on the detail side of a master-detail relationship with a custom object ? Why an user cannot create a master-detail relationship in which the User or Lead objects ...
1
vote
1answer
36 views

Creating a lookup relationship between two standard objects using a custom field

We are using the standard Salesforce Account and Order objects and are populating records via the Bulk API (using jsforce). Both Account and Order have a custom field external_id__c, which is the ...
0
votes
0answers
19 views

inline edit relational record aboout lightning datatable

How can we make it possible to edit relational record in the lightning datatable? Below is the current code, and I would like to you to correct this code to achive inline edit for relational reocrd. ...
1
vote
1answer
22 views

Object relationships

I have two objects Parent__c and Child__c, Child__c object have a lookup to Parent__c. This code is clear to me, Child__c has a Parent__c field through which it can access to the Parent__r object: [...
0
votes
1answer
37 views

put text by link style in lightning datatable [duplicate]

I want to put data in lightning datatable by url link style like attached to express the record of relationship. I tried header type "url", but it showed "http//" in the cells. How can we put data ...
0
votes
0answers
17 views

Don't leave Parent Page after adding a new Child object

I have an object: Parent and an object: Child on my SalesForce, the issue is that when I am on my parent object and I click on 'create new child' then I create this child, after confirming that child ...
2
votes
2answers
207 views

Parent to Child SOQL WHERE clause

I have a simple parent to child query: SELECT id, (SELECT checkbox__c FROM ChildRelationshipName__r) FROM Parent__c WHERE "How do I say (SELECT id FROM ChildRelationshipName__r) = true" Would it be ...
0
votes
1answer
31 views

Concatenate related contact names in a flow

I have a junction called MeetingContactRelation to link attendees to a meeting: Meeting - MeetingContactRelation - Contact I have a hidden rich text field on Meeting and want to store the ...
1
vote
1answer
46 views

Do really row counts from parent-child relationship sub-queries contribute to the row counts of the overall code execution?

Most of us know this is a very basic question but I little confused here again, As per the documentation here, it says that parent-child query row count is added to the overall row count in the ...
1
vote
1answer
104 views

Check box field on Parent object based on child object record type

I am trying to create a checkbox formula field on Account object. This is to be checked based on the record type and isactive field in another object (say Rel__c Object). These two objects have a ...
0
votes
0answers
64 views

How master-detail records are synchronized/accessible in junction object?

I have a Juction object CaseJiraItemAssociation__c which is have two master-detail relationship (on Case__c and JiraItem__c custom objects) and I have one outbound message (end point) on JiraItem__c ...
1
vote
2answers
30 views

Alternative of master-details relationship on standard and custom object sult

We have two object Opportunity(Standard) and Result(Custom), Now many opportunity connected to result object and we want some of opportunity amount to result object(like rollup), But We can't ...
2
votes
1answer
35 views

How to update child in Master-Detail relationship with REST API?

I have a Master-Detail relationship with Accounts and Locations. I am able to create the child using upsert, but when I try to update the Account__c field I get (INVALID_FIELD_FOR_INSERT_UPDATE: ...
5
votes
1answer
95 views

Any way to get Child Relationships without being bound by user permissions?

Question User object-level permissions limit the results of DescribeSObjectResult.getChildRelationships(). Are there any workarounds? I have submitted an Idea about this (https://success.salesforce....
0
votes
2answers
194 views

to access username field using LoginHistory Object

I am trying to access Username field (which is present in User Object) Using LoginHistory Object as follow: SELECT+Username+FROM+LoginHistory but is shows below error: [{"message":"\nSELECT ...
1
vote
1answer
34 views

SOQL Relationship issues

I am trying to write a SOQL query to pull out a number of items from 3 Objects - Contact, Account and Case. I have the following code: SELECT id, accountid, contactid, contact.primary_contact__c ...
0
votes
1answer
57 views

Related search for lookup. I have 3 different obj, Opportunity, Brand__c and Corporate__c

Flow is, 1st I register Corporate(Independently) and then brand. Each brand is associated to one corporate. In opportunity I want to choose Corporate which is a direct lookup and then Brand. Question ...
0
votes
0answers
22 views

Is it possible to reference custom field names of a child object in a text field to be used like a merge field on the child object?

I am trying to create a way to use templates and merge fields on custom objects just like you can use merge fields on email templates using text fields and a field updates. For example: I have 2 ...
1
vote
1answer
95 views

Object that is used for Case Feed comments

I'd like to create a trigger that fires every time a user, either internal or an external community user, comments on a case. Here is my comment I do know that the CaseFeed object is used because ...
2
votes
1answer
207 views

Didn't understand relationship 'Opportunities' in FROM part of query call

This is a real estate development that has a Development object and a Property__c object. Properties can be related to a Development or not. Also, properties are tied to opportunities. Now I need ...
0
votes
1answer
95 views

Cloning Parent -> Child -> Grand Child

I have one similar problem asked here. But My Objects are Project(Parent) -- > Milestone(Child) --> Action(GrandChild).. Deep Clone (Parent -> Child -> Grand Child) I have tried using the ...
1
vote
1answer
115 views

Create lookup field that can relate to two types of objects

I have a custom object, that I would like to relate to the built-in Accounts and Opportunities objects. Sometimes this custom object can be related to an Account, sometimes it can be related to an ...
0
votes
1answer
30 views

Retrieve a Filtered Data extension with fields of both the data extension

We are using Data Relationships as a Data Filter to retrieve data from two data extensions, but the filtered data extension has fields only that of the source data extension. What must I do so that I ...
0
votes
0answers
159 views

Issue upserting Account Contact Relationship - INVALID_FIELD_FOR_INSERT_UPDATE:Unable to create/update fields: AccountId

I'm upserting Account Contact Relationships the first load, works fine and we are upserting on a customer external ID field. When the upsert is run a second time - we see this error in the logs: "...
0
votes
1answer
118 views

Getting custom object data related to another custom object

I have been following this article to try and retrieve data for a custom object's related data. Basically, I have a Student__c object, and I have a StudentCourseRelationship__c object. the ...
0
votes
2answers
123 views

Many Lookup Relationship for One Object

I have the case of an object having two lookup relationship and I call for a list containing both relationship as follows. This is my Setup code public static List<Job_Application__c> ...
2
votes
1answer
192 views

Dynamic lookup? What is the best practices?

I know that lookup is 1-M relationship between just two objects. Tried to find but so far wasn't able a proper way. Maybe someone faced the same case and can share or give an advice? Use case: I want ...
0
votes
3answers
39 views

Get Custom Relationship Object's Name instead of Id into a List

I have a custom relationship to campaign object from opportunity object. When I am doing this: List<sObject> opportunities = [SELECT Name, Campaign__r.Name FROM Opportunity]; for (Integer i = ...
0
votes
1answer
45 views

Can't get SOQL statement to work for related object

I have an object Tourist_Details__c which has 2 child objects Contacts and Incidents__c. I already have a list of Incidents__c called results and now I need to get a list of all Tourist_Details__c ...
1
vote
1answer
114 views

Custom Relationship Field Limit not reflecting deletes

If I add a custom field to an object that is a Lookup() in the Fields & Relationships section of an object, the Object Limits page for the object shows an immediate increase counting against the ...
0
votes
1answer
67 views

Retrieve data on a single query

I need to retrieve an object's info from a single query. Lets say I have 4 objects (A__c, B__c, C__c, D__c). The relationship is that B__c has the master-detail relationship with A__c and B__c is also ...
1
vote
1answer
69 views

How to use the isUpdate() trigger handler on lookup relationship?

I have a custom object Hire_Form__c that has a contact lookup. It has the following fields: First Name Last name Email Phone Status (In Progress , Completed , Rejected) Candidate (Contact Lookup) ...
4
votes
1answer
85 views

Proper way to make Contract-Order, force 1-1 relationship

I'm looking out for a way to make the relationship between Order and Contract, 1-1, The relationship between both, is optional, but still, I'm unsure if I need to add a custom field to Contract that ...
0
votes
2answers
36 views

Combine and Query 2 Child object to a Parent Object

I was wondering can you combine 2 child objects to a parent object. SELECT SourceIp FROM LoginHistory WHERE UserId IN (SELECT Id FROM User) SELECT City FROM LoginGeo WHERE CreatedbyId (SELECT Id ...
0
votes
2answers
225 views

What happens when I delete the Task related to an EmailMessage?

We're looking for ways to get rid of some data in several orgs. One potential target would be the Task records that get created along with every EmailMessage. (I.e. the Tasks of which the Id is stored ...
0
votes
1answer
31 views

I can not link Note to a contact

I am writing a very simple plugin which creates Contact and associate a note to it. I noticed that to add a note to a contact, I should first create the contact after that add the note here is my ...
1
vote
1answer
141 views

Relationship query issue between case and a custom object

I have a Case object related to a Custom Object work part (Api Name- Work_Part__c ). Case is the parent object. I am trying to fetch all the work parts related to a case using below query List<...
0
votes
1answer
316 views

How to get the name of the relationship for inner queries in SOQL? [duplicate]

In Trailhead we have the query to get the Contacts for the Account named "SFDC Computing", with an inner query. SELECT Name, (SELECT LastName FROM Contacts) FROM Account WHERE Name = 'SFDC Computing'...
0
votes
1answer
114 views

Help updating record's field with lookup's child record

I have three objects: Order__c Package__c Account Package has a relationship with account and order. Order has a relationship with account. If a package has an account attached to it, how can I ...