Questions tagged [relationships]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 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
13 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
13 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
19 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
15 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
116 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
17 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
37 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
48 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
60 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
25 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
24 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
90 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
61 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
54 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
20 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
45 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
110 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
61 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
55 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
26 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
112 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
64 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
121 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
108 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
32 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
43 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
67 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
67 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
27 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
119 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
28 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
85 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
144 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
82 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 ...
1
vote
1answer
120 views

Many to Many Relationship on OpportunityLineItem, and similar Junction Objects.

I'm trying to add special characteristics that are not entirely products, so I thought, that the best way would be to make a many-many relationship between the Opportunity Line Products, Quote ...
3
votes
1answer
375 views

Deleting Custom Objects

I have three connected Custom Object I'm trying to delete. When I attempt to delete them, I get the following message. 'Your attempt to delete .... could not be completed because it is associated ...
0
votes
1answer
129 views

How to display in visualforce a related object - not related list

Hello I want to relate a custom object to OpportunityLineItem but OpportunityLineItem cannot have a lookup field pointing to it. I have a custom text field referencing the OpportunityLineItem Id - I ...
-3
votes
1answer
38 views

data modeling relationships [closed]

As I am analyzing standard objects, it's quite easy to understand Accounts Related Tab shows contacts as there is a lookup relationship on the contact object on AccountID field. On a similar ...
0
votes
0answers
7 views

How to restrict user from adding child record on parent object

How to restrict user from adding another child record on parent object, if parent already has 1 child associated to it
1
vote
1answer
97 views

Traverse a Relationship of Unknown Depth

Update: Okay so this was marked as a duplicate, which I can appreciate, because it is similar to the question posed here: Get 10+ Level Hierarchy Relationship - however, I believe mine differs ...
0
votes
1answer
146 views

Maximum number of children allowed in a parent-to-child lookup relationship

Is there any limit on the number of children a parent can have in a lookup relationship? If there is no limit, Is there any good practice guideline with regards to the number of children added to a ...
0
votes
1answer
86 views

Create one grandchild record per child record

I need to create automation that creates one grandchild record per child record, when criteria are met on the parent record. The initial criteria are straightforward: two field values on the parent ...
0
votes
3answers
115 views

SOQL & Custom relationships

I'm trying to understand how to query using relationships, I'm facing an issue I don't understand, Here is what I'm trying to resolve : I'm trying this, but it seems to be wrong.. Can you help me ? ...
1
vote
1answer
68 views

Traversing Contacts though Account object Visualforce

I have a Visualforce page with a standard controller Account. I want to access a rich text field in a related Contact. Below is what I tried: <apex:outputText value="{!Account.Contacts__r....
3
votes
2answers
432 views

Performance-wise, is it better to query a relationship field or a formula field?

Like AccountName vs Account.Name. The first being a formula field, and the second one a relationship. Since formula fields are like Schrödinger's Cat (the value depends on the time you are getting ...
0
votes
3answers
646 views

Why Owner relationship is not available for custom objects and for some standard object like Case?

This seems to be very strange. While we can use Owner relationship explicitly for many standard objects like Account and run this code without problems Account a = [ select Owner.Id from Account ...