Questions tagged [relationships]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
26 views

WhoId, OwnerId and WhatId CSV Headers?

Polymorphic & Relationship Fields I'm trying to insert a task via Bulk API and providing the below csv headers, but getting Malformed_ID error. Owner:User.FederationIdentifier Contact:Who.Id ...
0
votes
0answers
13 views

Query Case Feed Posts (Chatter)

I am bringing in a Case object from another org as an external object (read only). I am trying to re-create the notes associated with it from the chatter feed and build a lwc. The problem I am ...
0
votes
1answer
24 views

List all child, parent objects and its relation attribute key [closed]

I have a requirement where i want to display all salesforce objects in visual force page. After salesforce object selection, list its parent objects and relational key attribute name of current ...
0
votes
0answers
13 views

Auto Populate Master-Detail relationship when creating record in salesforce community

I am implementing a salesforce community. In that I have included a standard list view. So it enables New button and I can create a record using that. When creating an record the user have to fill a ...
0
votes
1answer
24 views

Control picklist values visibility

I have a custom object called "A". I have a custom object called "B". Custom object "B" is related to custom object "A" via lookup field. In custom object "A" as well as in custom object "B" I have ...
0
votes
1answer
24 views

Multiple records to be selected Via Lookup relationship Salesfroce

I have a custom object Patient. Requirement- New field with below details: Field label: "Linked Patient ID"; Field type = Lookup to Patient, should allow multiple values to be selected. Where ...
0
votes
1answer
39 views

Trying to update picklist based upon validating fields on related object

I want to update the picklist on object A, firstly by validating the status picklist on all related records object B = Rejected. This is my first go at apex and this is how far I got before I got ...
2
votes
2answers
54 views

SOQL Relationship name?

Case Object has a lookup relationship to Parent_Project_if_applicable__c The relationship name is Cases1. I receive the error message: Line: 15, Column: 28Id, AccountId, Account.Name, Cases1__r....
0
votes
1answer
30 views

Creating two SOQL search help

My trigger will send an email when an Account has 8 or more Cases created in 7 days. My first SOQL grabs Cases that fit the criteria. My second SOQL pushes the AccountIds of the Cases into a Set. My ...
0
votes
1answer
31 views

Declare custom object with relationships

Beginner disclaimer Apologies if this seems stupid but I've been a bit stumped by this. I have looked through documentation but cannot find the answer I need to here I am. I have a custom object ...
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
12 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
16 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
60 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
26 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
100 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
27 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
31 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
66 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
146 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
44 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
21 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
45 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
308 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
66 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
51 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
148 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
31 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
43 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
100 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
282 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
35 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
58 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
132 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
332 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
116 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
160 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
33 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
174 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
172 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
126 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
263 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
53 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 ...