Questions tagged [childrelationship]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
652 views

Creating child relationship with reference fails via Composite Tree REST API

In my setup, Leads can have multiple Affiliates (custom object Affiliate__c), which is implemented through a child relationship and where each Affiliate consists of a name and the two related objects: ...
stan's user avatar
  • 71
1 vote
1 answer
643 views

move all child records from one account to another efficiently

I did a bit of searching and didn't come up with anything so apologies if this is a duplicate, but - Situation: I am looking for a way to migrate all related object records from one (bad) account ...
Morgan Marchese's user avatar
0 votes
1 answer
236 views

parent to child soql not working

i am at a wits end, any help greatly appreciated I have a child object named acf_address__c , that is a child of the contact object the child relationship name on the acf_address__c is called ...
Jay Rizzi's user avatar
  • 455
0 votes
3 answers
2k 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 ? ...
Alexis MASSON's user avatar
1 vote
1 answer
452 views

How can I translate a "child relationship" reference into an object API name (external software via API)?

I'm poking around, writing a Python script to fetch ".reportType" XML files for all ReportTypes in an org and then do various things to those files. First up is figuring out what tables they include. ...
k..'s user avatar
  • 1,187
0 votes
2 answers
7k views

Can we use formula fields in lookup filters or how do I implement lookup filter to match `D.A` to be equal to `C.B.A`?

I am trying to introduce a lookup filter. I have standard object A, standard object D which has lookup to A and custom object B__c which has lookup to A and custom object C__c which has lookup to ...
Patlatus's user avatar
  • 16.1k
1 vote
1 answer
9k views

How to query to get the Quote and QuoteLineItem from opportunity?

I queried quote from opportunity using child to parent relationship. I need to get the all QuoteLineItem records from quote using same query. Could anybody help on this. Soql Query: List<id> ...
magi 001's user avatar
0 votes
1 answer
949 views

Creating test data for custom parent object and child object in test class

I am writing test class where I need to create test data for standard case object object and parent object for a custom field in case object. When I do the test run it is giving error at the ...
Uma N's user avatar
  • 35
0 votes
1 answer
86 views

SOQL required for a SQL

Cam someone please convert the below SQL query to SOQL? SQL: Select id, Name, product_code, (select product_code from product b where b.parent_id=a. id) as parent_code from product a How to ...
mani's user avatar
  • 187
3 votes
1 answer
2k views

How to show Contacts of Account according to hierarchy on VF page?

I have a requirement where I need to show contacts based on Account hierarchy on Account layout. For example : The below is 3 level one,but we can have up to 5 levels **Grand Parent** - See All ...
Learner's user avatar
  • 169
1 vote
0 answers
247 views

Fetch records from child relationship using Apex [duplicate]

I have a remote action that need to fetch an object child relationship data, but the catch is that is has to be dynamic. For example, the remote action will get Case, CaseComments, list of fields in ...
Ron Dadon's user avatar
  • 163
1 vote
0 answers
50 views

SOQL query on multi object [closed]

I'm trying to build a query on workbench to get the Name and Stage of opportunities created this quarter when there is task created by rep A or rep B on that account or on any of the contacts ...
Priscila's user avatar
3 votes
2 answers
501 views

Child Relationships in SOQL Queries Aren't Working

So I have these 3 queries, and all of them throw an error about the relationship not being recognized. this.lineItems = [SELECT QuoteLineItems.Product2Id FROM Quote WHERE Id = :activeQuote.Id]; [...
Nate Briggs's user avatar
0 votes
1 answer
245 views

related field through lookup

I have a custom object with a lookup field to the standard object Contact. If I use the custom object as a standard controller how do I acces the salutation and lastname on the contact object. I tried:...
Jenssen's user avatar
  • 419
1 vote
1 answer
3k views

Query opportunities with open activities

I would like to be able to query all opportunities that have open events. So far, I know how to do it with SOQL + Apex, but is there a way to do it just with SOQL? I'm looking for something like this ...
Javier García Manzano's user avatar
1 vote
1 answer
3k views

Want to fetch the child relationship name from the Lookup field name?

I am developing a functionality where I am to check for the presence of Child records, before executing a part of code. I can't do hardcoding since my code is going to be a part of a managed package, ...
Shobhit Saxena's user avatar
0 votes
1 answer
4k views

Multiple Sub Query using child parent relationship

Consider in my basket, I have a package (Main Product-just a holder) which will have 2 standalone products (child) and again the standalone products will have child products (Grand Parent). All these ...
user47200's user avatar
0 votes
1 answer
2k views

Add related list Id to List

I have a SOQL query which gives me the fields i expect: [Select (select Id,Name from signrequest__SignRequests__r) from Lead WHERE Lead.Id='00Q0Y000003iRelUAE'] But when i try to place the ids in a ...
Jenssen's user avatar
  • 419
0 votes
1 answer
2k views

SOQL Ids on a related list

I want to query ids on a related list from a lead. When I look up the related list name in the wsdl it says: <complexType name="Lead"> <element name="signrequest__SignRequests__r" nillable="...
Jenssen's user avatar
  • 419
0 votes
1 answer
702 views

insert a related list from a indirect relationship

I have an Account object, a related (master detail) contact object and a custom object Automobile__c that has a lookup to the contact. I would like to display the related Automobile__c records on the ...
Bartley's user avatar
  • 5,237
7 votes
1 answer
164 views

Programmatically Determine Which Objects Allow Lookup References to Them?

I'm wondering if there is a way, via apex, to retrieve all objects that would allow a lookup field on another object to reference them. For example, for a custom object obj1__c, I can create a lookup ...
Gary Hammell's user avatar
0 votes
1 answer
2k views

How to do a batch job to update a field in a parent object from multiple child object fields?

I have the custom object Project, which has a child Payers. One project can have more than one Payer. Payer has a field called Billing Percentage. Payer is a child of Account and Project has a lookup ...
Renaud's user avatar
  • 1
0 votes
3 answers
66 views

Show list of child records in table view?

I have a custom object that links to "Contact" and would like to display the list of all related records of the custom object in the "Contact" list view. Is this possible? So if I had, for example: ...
skaz's user avatar
  • 151
8 votes
2 answers
17k views

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

I am trying to query the child record using the parent record id. I understand that we have to use the child relation name in the inner query to get the child records. select id, (select id from ...
SfdcBat's user avatar
  • 4,761
6 votes
1 answer
521 views

SOQL query with inner query doesn't recognize understand the relationship

I'm trying to write a SOQL query that will retrieve a list of Content sObjects and return it's related child Attribute sObjects. First I wrote the SOQL query to grab the parent records, and it ...
splatto's user avatar
  • 173
2 votes
1 answer
120 views

How to use Sfdc.ChatterNotes.createNote() in my visualforce page to add a Note to my custom object?

I'm trying to have a button in my VFP that'll add a Note (AttachedContentNote) to my custom object. I want my button to do the same as the New Note button from the Note's relatedList in my custom ...
Hugues Lavoie's user avatar
1 vote
1 answer
2k views

How can I create a hierarchy (parent/child relationship) within the same object?

I have custom object Territory that can have a parent Territory and child Territory. For example, Territory "United Kingdom" with child territories "Scotland", "Wales", "North Ireland" etc. Each of ...
Alex Nekrasov's user avatar
0 votes
1 answer
373 views

assign lookup of accountId contact value on case field (Compile Error: Invalid foreign key relationship: Contact.cases )

i'm fetching data from soql need to insert account lookup value(accountId) and contact lookup value (ContactID) in case create from email services here is my code: String con_Email = envelope....
cloudZigZag's user avatar
  • 1,366
1 vote
1 answer
2k views

fetching account lookup value on case in inner query

I am fetching account lookup value in class using inner soql query but it throwing error Compile Error: No such column 'Account' on entity 'Case'. If you are attempting to use a custom ...
cloudZigZag's user avatar
  • 1,366
2 votes
3 answers
5k views

Where do I find this related list API name to access in query?

I have a related list on my Contracts for Orders. I am querying for certain contracts, and I want to Select ID, startdate, and some other fields, along with its corresponding related list of orders. I'...
Natalie Spatharakis's user avatar
0 votes
2 answers
2k views

I cannot create child object to junction object

I have a junction object(JuncObj) with a custom object(ParentObj1) and contact as the masters. I've created a separate obj(NewChildObj) that is supposed to be a child object of JuncObj. When I create ...
Rufus K.'s user avatar
  • 505
1 vote
1 answer
247 views

Child relationship expressions __r in SOSL [duplicate]

Is that possible to have a child relationship expressions __r in SOSL List<List<SObject>> searchList = [FIND :searchText+'*' IN All Fields RETURNING Account (id,name,industry), ...
Nick's user avatar
  • 6,934
0 votes
0 answers
329 views

Child Relationship use in Visualforce

In a visualforce page I can get a list of child records directly (without any query) using the child relationship name like {!ParentObject__c.Child_Relationship_name__r} and this list is of the type ...
Jose's user avatar
  • 2,102
2 votes
1 answer
2k views

Bulk-API insert with sObject Tree

I am attempting to do an insert of thousands of record using the Bulk-API, which is in itself is not complicated. The thing that I am having trouble with is insert both Record and Child. For example, ...
Tekill's user avatar
  • 299
5 votes
2 answers
16k views

SOQL to determine if parent has child records

Simple and short question, what is the cheapest way to query (plain SOQL) if an object has child records? I want to avoid running into limits even if there are parents with millions of child records.
noBillSide's user avatar
-1 votes
1 answer
304 views

i want to edit the empty field on the vf page named as notes

I have created the vf page on account in which account name and account number are read only and there is child object of account named as notes in which there is field notes which is editable on Vf ...
anurag's user avatar
  • 1
0 votes
0 answers
63 views

Child-to-Parent Relationship

when i am query the Child-to-Parent relationship(contact to account) relationship field(account.name) showing value is = (null account) My query : select name,account.name from contact but parent-...
Sfdcprgmr's user avatar
  • 405
0 votes
1 answer
107 views

Fetch child account name from parent

Estimate is the parent and it has Bid Request as a child. In Bid request there is a field "Name" Above the "Bid Estimate" field, display the selected Contractor's name that is associated to the ...
Pankaj Kumar's user avatar
3 votes
4 answers
2k views

Sub-Querying Objects, Plural Relationship Name?

This may be pretty basic I've come across something in SOQL I'm not sure I totally understand. List<Contact> con = [SELECT Id, (SELECT Id, Name, CreatedDate, ContentType FROM Attachments WHERE ...
Dan Jones's user avatar
  • 7,147
2 votes
1 answer
2k views

Didn't Understand Relationship - How To Find Child Relationship Name?

I have a many-to many relationship between three objects. LGFProducts, PartsinProducts, and Parts. PartsinProducts is the junction object. I want to be able to get data like the names of the parts ...
user1470901's user avatar

1
2