• James Bengel
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I've been tinkering with a query as an exercise/proof of concept that would return an account, its associated contacts, opportunitires and cases, with some details of each related record.  And for the most part it works great. The part that breaks is when I try to pull in the contact name (first and alst) form the contact related to each Case -- as opposed to the contacts across the entire account.  If it comes ot it, I'll probably have ot manipulate the results in Apex anyway, so I can do the cleanup there, but I'm trying to work out if this is even possible, and so far coming up with only pat of an answer. (For the time being I'm just running these form the Qeury Editor in Developer Console.)

The part that works looks like this:
SELECT Id, Name,
 (SELECT FirstName, LastName, Title, Email, Phone FROM Contacts),
 (SELECT Name,StageName,Amount,CloseDate FROM Opportunities),
 (SELECT CaseNumber,ContactId,Subject,Priority,Status FROM Cases)
FROM Account
WHERE Name = 'Burlington Textiles Corp of America'

Adn this gives me everythign I ask for with no complaints, and I can also get any of the contact fields that are actually transcribed to the  Case record (Email, Phone, Fax, etc.).

What breaks, is when I try to get something form the Case Contact by reference like:

SELECT Id, Name,
 (SELECT FirstName, LastName, Title, Email, Phone FROM Contacts),
 (SELECT Name,StageName,Amount,CloseDate FROM Opportunities),
 (SELECT CaseNumber,ContactId,Contact.FirstName, Contact.LastName, Subject,Priority,Status FROM Cases)
FROM Account
WHERE Name = 'Burlington Textiles Corp of America'

Which basiclaly gets me everything I want, but it also gives me some extraneous information abotu how it GOT the first and last name of the contact.

"Contact":{"attributes":{"type":"Contact","url":"/services/data/v48.0/sobjects/Contact/0031U00001G0UCdQAN"},"FirstName":"Perry","LastName":"Noya"}

If I attempt to embed a second query for Contact within the subquery for Case, it just throws an error saying it doesn't understande the relationship, and am I missing the __r? (No.)

It may be that I just live with the additional text and clean it up in Apex, but I'm tryign to determine if I'm just missing something simple first.
We are beginning work on several new projetcs and are evaluating which platforms are best suited to what types of applicaitons. Salesforce is a populr choice among our team, but the agency has not yet procured it.  We want to collaboate on a few proofs of concept, and since I alreayd had a developer edition org, I was hoping to add the other 3 members o fmy team to it so that we would all be looking at the same thing. I could only create one addiitonal user with a Salesforce license, however, before that optoins disappeared form the available selectoins in the drop down.  Salesforce Platform was the only choice that looked even similar to it, and without that license the System Admin profile isn't available either.

So did I miss something, or is there a limit to the number of Salesforce users you can have in a DE org? And if so, is it possible to clone an existing profile under the Salesforce Platform license that can be granted sufficient permissions to do development work?

If we all have to get a unique instance and work in silos, it's not the end of the world (that's how the other two PaaS platforms we use work, and we've managed so far ).  It just seemed like working in a single instance where everybnody was level set would make it easier to get everybody up to speed at more or less the same rate.  Everything we do seems to be a learn-as-you-go proposition, so the more we cna collaborate the quicker we all start being productive.
I've been tinkering with a query as an exercise/proof of concept that would return an account, its associated contacts, opportunitires and cases, with some details of each related record.  And for the most part it works great. The part that breaks is when I try to pull in the contact name (first and alst) form the contact related to each Case -- as opposed to the contacts across the entire account.  If it comes ot it, I'll probably have ot manipulate the results in Apex anyway, so I can do the cleanup there, but I'm trying to work out if this is even possible, and so far coming up with only pat of an answer. (For the time being I'm just running these form the Qeury Editor in Developer Console.)

The part that works looks like this:
SELECT Id, Name,
 (SELECT FirstName, LastName, Title, Email, Phone FROM Contacts),
 (SELECT Name,StageName,Amount,CloseDate FROM Opportunities),
 (SELECT CaseNumber,ContactId,Subject,Priority,Status FROM Cases)
FROM Account
WHERE Name = 'Burlington Textiles Corp of America'

Adn this gives me everythign I ask for with no complaints, and I can also get any of the contact fields that are actually transcribed to the  Case record (Email, Phone, Fax, etc.).

What breaks, is when I try to get something form the Case Contact by reference like:

SELECT Id, Name,
 (SELECT FirstName, LastName, Title, Email, Phone FROM Contacts),
 (SELECT Name,StageName,Amount,CloseDate FROM Opportunities),
 (SELECT CaseNumber,ContactId,Contact.FirstName, Contact.LastName, Subject,Priority,Status FROM Cases)
FROM Account
WHERE Name = 'Burlington Textiles Corp of America'

Which basiclaly gets me everything I want, but it also gives me some extraneous information abotu how it GOT the first and last name of the contact.

"Contact":{"attributes":{"type":"Contact","url":"/services/data/v48.0/sobjects/Contact/0031U00001G0UCdQAN"},"FirstName":"Perry","LastName":"Noya"}

If I attempt to embed a second query for Contact within the subquery for Case, it just throws an error saying it doesn't understande the relationship, and am I missing the __r? (No.)

It may be that I just live with the additional text and clean it up in Apex, but I'm tryign to determine if I'm just missing something simple first.
I want to have a read-only look-up field in my instance of Salesforce. However, whenever I build one, they either seem to be invisible to all, or editable.
 
I want a Read-Only Look-up field is so I can update it later using some behind-the-scenes APEX coding as part of the sales & contracting process. I just don't want people to be putting information in that field before they're supposed to.
 
Does anybody know if Salesforce doesn't allow for Read-Only Look-ups? I'd understand why.
 
Thanks for your help!
 
Andy