The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
17 views

Accessing child records in visualforce

I have an object Feedback_Comment__c which lookups to Feedback__c. How can I access "Feedback_Comment__c" fields in a datatable column? I could pull all Feedback__c fields like this... ...
3
votes
2answers
52 views

Cannot access owner fields in new instance of child object even though OwnerId is populated

I have CustomObject__c that has the standard Owner field (which is a lookup field to a User). My code is the following: User myUser; //assume I've populated myUser as a result of a SOQL query or ...
2
votes
1answer
28 views

activity aggregate relationships only allow security evaluation for non-admin users when a single parent record is evaluated

I am getting the following error when I run a Salesforce SOQL query with a standard account. Query: SELECT ( SELECT Id, Subject FROM OpenActivities ORDER BY ActivityDate ASC , LastModifiedDate DESC ...
1
vote
1answer
20 views

How do I insert a list of related line items in apex?

I am creating a visualforce page and a custom apex class for a page that allows users to convert opportunities and opportunity line items into service contracts and contract line items. I've got all ...
3
votes
1answer
24 views

Relationship Query to Get All Events Associated with Account

I have the following query that works for getting all the Tasks and Events for a Lead. [SELECT ID, activity_count__c, (SELECT ID FROM Tasks WHERE Status = 'Completed'), (SELECT ID FROM Events) FROM ...
2
votes
0answers
32 views

Problems querying on KnowledgeArticle related objects

I'm trying to issue some SOQL which will return a KnowledgeArticle along with it's KnowledgeArticleVersion, ViewStats, and VoteStats. According to the Knowledge data model I should be able to do this ...
2
votes
1answer
25 views

Task Relationship Issue

I know that task is associated to a custom object by using the "WhatID". I need a filter based on if the task exists or not. For example parent__c and task: [select id, (select id from tasks) from ...
4
votes
1answer
63 views

DescribeSObjectResult contains fields of type reference with an unknown relationship name

I use the SOAP API (WSC, partner wsdl) to describe objects and use the field meta information to dynamically build SOQL queries. Today i observed that DescribeSObjectResult can contain fields of type ...
3
votes
3answers
60 views

SOQL - How to obtain Parent Name of CombinedAttachments

I am unable to obtain the Name of a Parent object, where the child is CombinedAttachments. The SOQL I use is listed below and works as expected. Select (Select Id, Title, RecordType, ...
3
votes
2answers
55 views

No master-detail relationship in which the User or Lead objects are the master?

Why can't we create a master-detail relationship in which the User or Lead objects are the master, any particular reason?
4
votes
3answers
114 views

Difference between __c and __r?

I read this article for difference between __r and __c. But I still can't understand how is Hiring_Manager__c.Email will be different from Hiring_Manager__r.Email Can anyone explain this? Thanks ...
3
votes
5answers
371 views

Relationship between account and contact

I checked 'Account Name' field in Contact object. It appeared as a Lookup(Account). But when I deleted that account, contact also got deleted which tells me it is a master-detail relation. Can anyone ...
4
votes
1answer
163 views

Difference between a self relationship and Lookup relationship

With Self relationship you can reference the same object, at the same time you can create a lookup relationship and still refer to the same object. So when do you call a relationship as self vs ...
1
vote
1answer
45 views

SOQL to get SmallPhotoURL

I am trying to create a custom VF page that shows records from my standalone custom object in a list along with the picture of the user who created that record..like this (User's image is hardcoded ...
1
vote
1answer
70 views

How to find accounts with no child accounts using soql?

I have requirement where i need to process account which has no child but has parent and accounts which has no parent and child separately. I tried select id, name,(select id, name from Accounts) ...
2
votes
2answers
172 views

SOQL Subquery - Standard Parent, Custom Child

Can someone help me understand why Im unable to execute the following query? Is it something obvious? Custom_Object__c has a lookup relationship to Contact. select Id, (select Name from ...
4
votes
1answer
60 views

Triggering code on sObject Child Relationship actions

I have a scenario in which I would like to fire off some Apex functionality when an Attachment is inserted from an EmailMessage object (that is received via Email-to-case). The trouble is, it does ...
2
votes
1answer
99 views

trigger to update lookup fields in 2 object lookup fields

trigger to update lookup fields in 2 object lookup fields My requirement is : a) i am having 2 lookup fields in 2 different objects with fields with common fields "city" If i update a city using ...
0
votes
2answers
119 views

How to set reference Object's value before insert?

Object a has many of object b, How can I determine an object reference before insert ? When I determine object b information for example number, name, .. and I want to insert it to an object of ...
0
votes
2answers
138 views

How can reference a custom object to a Opportunity object?

I have a custom object named Order, its fields same with Opportunity and I set lookup between them, what I need is when I create an Order record, a related Opportunity record is also be created ...
3
votes
2answers
305 views

Junction object fields

I have created a many to many relationship between two objects, A and B, using a junction object. That works fine, and the related lists show up on A and B with standard layout pages. Is it possible ...
1
vote
2answers
106 views

How to add multiple entries into a related list?

I have 2 custom objects: Package and item. Each package can have multiple items, and I know that when I create a new package. I tried to have a lookup field on package to display items. - But that's ...
3
votes
1answer
152 views

Join Custom object with regular object

I'm very new with Salesforce. I've been reading this page trying to figure out how to do joins. All the objects were created before I jumped on this project. I have one custom object called : ...
4
votes
1answer
289 views

Accounts with many-to-many relationship with accounts — how to create a report on contacts

I'm setting up an org that has a many-to-many relationship between "buyers" and "sellers." I'm using the Account object for both buyers and sellers and set the Type field picklist to have the choices ...
2
votes
1answer
255 views

Related Custom List With Order and Inline Editing - Many to Many relationship and Junction Object

We are using three objects in this project: Contact (for authors), Paper, and junction object PaperAuthor. Paper holds all all attributes to describe an academic paper. Paper can have many Authors. ...
7
votes
1answer
985 views

SObject row was retrieved via SOQL without querying the requested field:

I am getting this error with the code below. I've looked into the other cases on here. In my case I am referring to a relationship name (__r) which I am assuming is pulling correctly. It's a field ...
9
votes
2answers
344 views

Do child/parent relationship names need to be unique?

Don't all child relationship names on an object need to be unique ? I know they need to be unique if it's a relationship name on a parent to child relationship, but I thought they still needed to be ...
1
vote
1answer
672 views

Parent and Parent.Id with custom objects

I am attempting to adapt some code which was originallly written to work off of an Account object to now work on a custom object. Part of the code is referring to the Parent Account of whichever ...
2
votes
3answers
358 views

SOQL relationship name syntax error

I want to return the account name for each task in a SOQL query, am I correct in saying the relationship is that the Account is the parent object and the Task is the child object? I am not sure who to ...
4
votes
1answer
358 views

How to retrieve a value from a parent field with SOQL via partner API in java

I have a parent-child relationship with timesheets relating to users. I am trying to retrieve an Employment ID field from the parent record with SOQL and this is my query, where the UserID is a field ...
2
votes
1answer
33 views

Can you create an Account View filtered by a junction object?

I am trying to create an Account view that is filtered by values in a related junction object. The structure looks like this: Account <= Franchise Account Association => Franchise The Account ...
6
votes
4answers
513 views

Bulk API & Foreign Key Resolution on Lookup Fields

We are designing an Integration leveraging Bulk API & Enterprise WSDL (The client code is handled by the source system). The target Force.com Object has few Lookup Fields. Wanted to understand how ...
0
votes
1answer
414 views

I have created a custom lookup field. But the records are not displayed in the related list of the parent object

I have created a custom lookup field. But the records are not displayed in the related list of the parent object. Suggest me what needs to be modified or checked
2
votes
1answer
102 views

Salesforce Relating objects without Lookup ID

We have an app that pulls data from our rails server and loads it into SalesForce via batch jobs. The object that we load data into MyObj has 2 lookup fields for relating it to Contacts and Leads. The ...
3
votes
4answers
2k views

How to select only those objects that have child relationship?

Let's say I have object Parent that has a child relationship Child__r. I'd like to select only those parents that have children through SOQL. How can I do that?
14
votes
4answers
600 views

How to apply uniqueness on Junction object?

I have a junction object C of A and B. I found out that I can create multiple entries of A and B in Object C - this is wrong, as in my case, each combination of A and B should appear only once in ...
1
vote
1answer
792 views

append '__r' after the custom relationship name

I have initiated a trigger on Sales_Order__c custom object. I want to upsert a lookup field - Order_History__c which is a link to OrderHistory (API name - Sales_Order__c) object. ID_Opp_Product_18__c, ...
2
votes
1answer
72 views

Navigate Relationship soql

My objects are: CONTACT(lookup)-----ACCOUNT (master)-----ACCOUNT PLAN(detail/master)------INFLUENCER(detail) I want create a lookup on INFLUENCER that shows only the contacts related. With soql ...
3
votes
2answers
795 views

Error: Field must be grouped or aggregated

We have a lookup relationship between a custom object Problem__c and cases, one problem can be related to many cases. I am trying to query the field or problem records and the number of related cases, ...
2
votes
1answer
239 views

Are you required to have access to all parent-records in order to access the child-record where all relationships are master-detail?

Let's say you have a child object Child__c that has 2 master-detail relationships and assume you don't have Modify/View All access to the child object or overall. Also assume that all object OWDs are ...
1
vote
5answers
135 views

How to get all the parents for an object?

Say I have a custom object, and I want to get the list of parents for it, is there a quick way to do it? I didn't see it in eclipse. The only way I can think of is going to the object detail page and ...
6
votes
1answer
245 views

Why does the documentation stipulate that a many-to-many object relationship requires two master-detail relationships?

In theory you can model a many-to-many relationship using lookup fields exclusively or in combination with a master-detail field. However the documentation only mentions master-detail fields. What ...
7
votes
1answer
386 views

Lookup Relationship question

I'm still new-ish to SF, so sorry if this is a stupid question. Set-up I create an object, test, and at creation I allow activities to be associated with that object. Test has a lookup ...
2
votes
1answer
1k views

Formula Field to Count Records in Lookup Relationshp

I want to count the number of child objects in a lookup (not master-detail) relationship. Since no rollup-summary (COUNT) fields are supported I thought I would do this: ...
1
vote
1answer
342 views

Custom New Button that creates record of specific type and parent record in Visualforce Controller (No URLFOR!)

Sorry for the lengthy title. But I want to make sure that I was not able to solve my problem with the standard answers to questions like this. I have a CustomObject_c that has many record types and a ...
3
votes
0answers
81 views

Is possible to relate Data Categories to custom objects records?

I have some data in Knowledge and Answers that I'd love to relate to other data in custom objects? Is it possible to refer data categories from custom objects, besides sort of manually (and ...
3
votes
1answer
162 views

Can you add relationships to knowledge articles?

It seems like the answer to this is no but I wanted to ask anyway. Knowledge articles themselves dont allow a lookup or a mater-detail field. And from what i can tell you cant add a lookup field ...