• sauravsharma001
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
I have created one REST API in Apex which takes paramters and create a case and in return I have to send Case Number of the created case. The problem is when I am trying to query the case object with the help of the case id generated in insert query, I am getting this error : List has no rows for assignment to SObject

@HttpGet
global static String doGet() { 
   Case c = new Case (
        Subject = 'Test',
        Status = 'New'      
   );
   Insert c;
   System.debug('Case ID: ' + c.id);
   Case newCase = [Select id, CaseNumber from Case WHERE id =:c.Id];
    return (String.valueOf(newCase));
}
There is a Visualforce Page which is used to display case location in map by taking the address present for the case. The Visualforce Page is inside case page layout. The problem is that the map is working fine in some computer. But in some system it is not getting loaded. Although I am using same user profile.

How to get the metadata of fields including  the custom fields of case in apex class?

Like the default value , description, required or not , type, etc .

How to get the metadata of fields including  the custom fields of case in apex class?

Like the default value , description, required or not , type, etc .

Hi all,

 

I have a java program which do the following

 

1.Gets the data from salesforce.

2.Forms a request string to query an external server.

3.Send request to that server and get the response from the server.

4.Get the required data from response and update it in slaesforce.

 

This is working fine when java program is executed on my machine. What we need now is to invoke this

java program from salesforce on a timely basis(for every 10 or 15 min)

 

If any one came across this situation ,Please help me regarding this, as we need this urgent.

 

Thanks & Regards,

 

Jagan.

 

 

  • March 03, 2009
  • Like
  • 0