• SKB
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 1
    Replies

i am getting 201 as the REST response code when i used insert Resource URI for standard object. But the same thing is not happened when i write custom POST method. i am creating a record explicitly using insert statement. when i exectuted the REST method i got 200 as the reponse code instead of 201. What i did wrong here?

 

 

thanks,

skb

  • December 17, 2012
  • Like
  • 0

Hi,

 

My client is a salesforce consultant who insisted me to follow the OOP standards given below. The requirement is to create REST API services which would be called from external web application (Drupal website).

 

As per the client word....

 

"The REST services will provide serialised object data in JSON (JavaScript Object Notation). The JSON will be produced from serialised custom DTO classes rather than directly from SalesForce sObjects. These DTO classes will expose properties containing various aggregations, groupings and summary information"

 

Requirement:

 

Method: REST API @HTTPGET

 

Input: UserId (portal user)

 

Returns:

Account Name, Industry, Phone, Billing Address from Account Object

All Contacts [FirstName, LastName, Email, Phone, Department] for the Account

 

 I am really confused that DTO's are wrapper classes kind of thing. I dont know how to combine the data from two objects (Account and Contacts) using DTO. What is DTO and how to start writing DTO's and how it can be used? Can anyone explain me in detail or provide me some examples would be very much helpful...

 

Thanks,

SKB

  • December 17, 2012
  • Like
  • 0

In REST API, can we create multiple @Http Methods (for e.g. @HttpGet) annotations of the same type in a single class? i have a need where i need to write more than one get method in the same class? is that possible and if it is how?
 
Thanks,
skb

  • December 17, 2012
  • Like
  • 0

Hi,

 

My client is a salesforce consultant who insisted me to follow the OOP standards given below. The requirement is to create REST API services which would be called from external web application (Drupal website).

 

As per the client word....

 

"The REST services will provide serialised object data in JSON (JavaScript Object Notation). The JSON will be produced from serialised custom DTO classes rather than directly from SalesForce sObjects. These DTO classes will expose properties containing various aggregations, groupings and summary information"

 

Requirement:

 

Method: REST API @HTTPGET

 

Input: UserId (portal user)

 

Returns:

Account Name, Industry, Phone, Billing Address from Account Object

All Contacts [FirstName, LastName, Email, Phone, Department] for the Account

 

 

I am really confused that DTO's are wrapper classes kind of thing. I dont know how to combine the data from two objects (Account and Contacts) using DTO. What is DTO and how to start writing DTO's and how it can be used? Can anyone explain me in detail or provide me some examples would be very much helpful...

 

Thanks in advance

SKB

  • December 12, 2012
  • Like
  • 0

In REST API, can we create multiple @Http Methods (for e.g. @HttpGet) annotations of the same type in a single class? i have a need where i need to write more than one get method in the same class? is that possible and if it is how?
 
Thanks,

skb

  • December 12, 2012
  • Like
  • 0

In REST API, can we create multiple @Http Methods (for e.g. @HttpGet) annotations of the same type in a single class? i have a need where i need to write more than one get method in the same class? is that possible and if it is how?
 
Thanks,
skb

  • December 17, 2012
  • Like
  • 0