function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mPortalWizmPortalWiz 

sorting of response

Hello,

I am working on the 1.7 version of xml-rpc version of salesforce api.

1. How can I sort accounts/contacts/leads etc. alphabatically?

2. How can I sort the events based on time of a day?

3. The data populated in each of the drop-down(combo box) such as subject in event/tasks, status in leads, industry in accounts etc. , how to retrieve them? From where are they read? entity -relationship in this regard is not clear.

4. Customized files such as Sic Code, interest in leads , how to retrieve them?

Please respond soon.

mPortalWiz.

DevAngelDevAngel

HI mPortalWiz,

There is no sorting available on the server, you will need to do any sorting on the client side.  Keep in mind that sforce is a scalable muli-tenant service with performance being a premium.  Because of this, we don't want to have to sort results on the server on arbitrary fields.  There is too much risk of performance impact by a request to sort a huge number of records on on possibly non-indexed fields.  In the end, it is probably more efficient to sort on the client anyway.

I would recommend that you use the latest version for xml-rpc which is 2.0.

The describe call results for an object such as account will contain the drop down values in the definition for the field in question.  These values are in the display struct of the field.

Custom fields are also returned in the describe response for an object.  A custom field has an attribute of custom = true in the field definition.  The field name, used in selects and queries, is pre-pended with "cf_" to adhere to xml standards.  You should use the field attribute from the field definition for the custom field when referencing a custom field in a select list or query.

Cheers