0

Am trying to get the results from REST for the following URL....

https://{instance}.salesforce.com/services/data/v32.0/sobjects/{custom_object}__c

am getting the response through advanced rest client (chrome extension) as follows :

{
objectDescribe: 
{
activateable: false
createable: true
custom: true
customSetting: false
deletable: true
deprecatedAndHidden: false
feedEnabled: false
keyPrefix: "{}"
label: "{}"
labelPlural: "{}"
layoutable: true
mergeable: false
name: "{custome_object}__c"
queryable: true
replicateable: true
retrieveable: true
searchable: true
triggerable: true
undeletable: true
updateable: true
urls: 
{
........
-
}
-recentItems: 
[2]
-0:  
{
attributes: 
{
type: "{custom_object}__c"
url: "/services/data/v32.0/sobjects/{custom_object}__c/{id}"
}
Id: "{id}"
Name: "{{custom_name}}"
}
-1:  
{
attributes: 
{
type: "{custom_object}__c"
url: "/services/data/v32.0/sobjects/{custom_object}__c/{id}"
}
Id: "{id}"
Name: "{custom_name}"
}

Can we add some more fields to the existing id,name, attributes fields???

3
  • If you meant "How can I add more fields to my Custom Object", don't consider my reply below. Go for Setup -> Create -> Objects (open page) -> Click on your object name (not Edit link) -> Scroll and click "Add custom field". Or: Setup -> Schema Builder (graphical tool).
    – MLucci
    Nov 11, 2014 at 17:41
  • Again, sorry for another update but I think I got to the bottom of your question finally: you'd like to see more fields in the RecentItems list of records. Standing to this link seems it's not possible, you'd have to make an additional query with the Ids there provided in order to get your data. developer.salesforce.com/forums/…
    – MLucci
    Nov 11, 2014 at 17:49
  • 1
    Thanks for the link MLucci. Anyways, after this discussion i came to understand that we can't change recent items list in custom object (as far as my knowledge). Nov 12, 2014 at 6:10

1 Answer 1

1

EDIT: This does not answer completely to OP question, see comments to original question for correct answer

Yes and no.

No, you can't modify the behavior of that Salesforce standard URL.

Yes, you can create a separate REST resource which returns any data in any form you like. (And reproducing the above - which is an Sobject describe JSON - is feasible using Describe utilities)

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_methods.htm + https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_sobject_describe.htm + some code handcrafting = what you need (probably)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .