• GB3
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
Hi,

Is it possible to select parent values where the child field has a certain value?

For example:
 
Select Name
From Contract
Where Contract.Orders.Status = 'Draft'
I get the error: 

Didn't understand relationship 'Contracts' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.  Even if I add the __r to Orders though, I get the error...


 
  • March 13, 2019
  • Like
  • 0
I'm using jsforce to query a salesforce from the command line

When I do query that has nested values, how do I show the object data?

For example, I want to get the contacts for an account...

At the command line I type:
> query("select name, (select lastname from contacts) from account")



The result I get is:
{ totalSize: 4,
  done: true,
  records:
   [ { attributes: [Object],
       Name: 'Acme (Sample)',
       Contacts: [Object] },
     { attributes: [Object],
       Name: 'Global Media (Sample)',
       Contacts: [Object] },
     { attributes: [Object],
       Name: 'salesforce.com (Sample)',
       Contacts: [Object] } ] }
How can I I get the full json response for the contacts (i.e., list of contact data), rather than just "[Object]"?

Thank you.


 
  • December 17, 2018
  • Like
  • 0
When I'm trying to delete a custom object, I get the following error:
Your attempt to delete [OBJECT NAME] could not be completed because it is associated with the following relationships with other objects.
It then shows fields that referenced that object. 

The problem is that I deleted those associated fields from the other object, and I'm still getting the error.

Do I have to clear the deleted fields somehow else?
  • December 05, 2018
  • Like
  • 0
How can I make a child object field non-editable / disabled if a field in the parent object is a particular value?

For example, if the "Product" in the master object (Order) is "Product ABC", then I want the "Expedite" field in the child object (order detail) to be non-editable (ideally, the field would be grayed out / disabled).

Below is my attempt, however, it is still letting me edit the child field:

AND(
Order.Product__c = "Product ABC", ISCHANGED(Expedite__c)
)
  • December 04, 2018
  • Like
  • 0
Hi,

Is it possible to select parent values where the child field has a certain value?

For example:
 
Select Name
From Contract
Where Contract.Orders.Status = 'Draft'
I get the error: 

Didn't understand relationship 'Contracts' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.  Even if I add the __r to Orders though, I get the error...


 
  • March 13, 2019
  • Like
  • 0