• srihari koyila
  • NEWBIE
  • 5 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
The validation rule should be on the Case object.
The validation rule should be named 'Mark_as_Escalated'.
The validation rule should fire if someone tries to set a case as escalated and it is closed, closed when created, or does not have a priority of High.
The validation rule should display the error message 'You can only set a case as escalated if it is high priority and not closed' under the Escalated field when triggered.
Add the 'Escalated' field to the Case page layout.
Hi All,
    I am having an issue, which I haven't been able to solve.  in my Apex controller, I have a defined a public class as follows:
public class ContactsAndUser {
        public String userName      {get; set;}
        public String userEmail     {get; set;}
        public String userId        {get; set;}
        public String conImage      {get; set;}
        public String role          {get; set;}
    }

I am populating this class from a soql query into an array as follows ( The idea is to populate the List ContactList from users from the Case Object, Opportunity, User, and Contact Object to make a list of everyone associated wtih a deal ):

list<ContactsAndUser> contactList       = new list<ContactsAndUser>();  
              ContactsAndUser newUser = new ContactsAndUser();
              newUser.userEmail    = ownerInfo[0].Email;
              newUser.userName     = ownerInfo[0].Name;
              newUser.userId       = ownerInfo[0].Id;
              newUser.conImage     = ownerInfo[0].SmallPhotoUrl;
              newUser.role         = '[ Case Owner ]';
              contactList.add(newUser);  

When i debug the function (system.debug('LIGHTNING DEBUG ' + contactList);) I see a populated result in the logs, however, the result items are enclosed in [] square brackets instead of {}. i.e. LIGHTNING DEBUG (ContactsAndUser:[conImage=https://ciscosales--gve--c.xx.content.force.com/profilephoto/005/T, role=[ Case Owner ], userEmail=email=example.com@example.com, userId=00580000007IKULAA4, userName=Leads & Prospects Management Site Guest User])
 
In this example above, the response.getReturnValue() on my lightning event comes back empty.

If I run the same against the standard opportunity or case object as follows:

List<Opportunity> opportunities =
                [SELECT Id, Name, CloseDate FROM Opportunity];
        system.debug('LIGHTNING DEBUG ' + opportunities);
        return opportunities;
I notice the debug log returns the result encapulated in {} curly brackets instead of square brackets, and the result is returned in the response.getReturnValue() event.


Sorry for the very detailed description of the issue, but hoping for some input so I can get this working.

Best Regards,

Andrew