GetCustomFields()

Abstract

The GetCustomFields() API function is an XmlHttp function to obtain the custom fields available on the main form for the record provided along with any currently set values.  This function must be called after the LogonUser() function.

API Address

https://api.tracker-rms.com/WebAPI/XmlHttpGetCustomFields.aspx

Request Format

The input format XML for this function is as follows:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <GetCustomFields>
            <UserCredentials>
                <SecurityToken></SecurityToken>
                <Username></Username>
                <Password></Password>
            </UserCredentials>
            <RecordType></RecordType>
            <RecordId></RecordId>
        </GetCustomFields>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<SecurityToken> This will be the 40 character security token obtained from the LogonUser() function
<Username> The username is typically the email address for the user in the format name@domain.com
<Password> The password will be the same as their web based password and can contain a combination of upper case, lower case and alpha-numeric characters
<RecordType> The record type indicates the type of record required and is set to one of the following values.
Activities             Leads                    Resources                                                               Accounts             Opportunities     Tickets                                                                         Contacts              Projects
<RecordId> This is the Id of the record type for which the folders relate

Response Format

The function will return the standard RequestStatus section along with the access rights for each part of the application to which the user has access.

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetCustomFields_Return>
            <CustomFields>
                <CustomField id="" type="" value="">
                    <CustomFieldList>
                        <CustomFieldListItem/>
                        ...
                    </CustomFieldList>
                    ...
                </CustomField>
            </CustomFields>
        </GetCustomFields_Return>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<CustomField> (collection) Within the <CustomFields> node is the individual <CustomField> elements that contain the specific custom field id, type and value for the record type and id specified.
<CustomFieldList> (collection) Within the <CustomField> node is the individual <CustomFieldList> and <CustomFieldListItems> elements that contain the any relevant items to list when setting the custom field.

Example of a valid return:

In this example below the user has access to 6 record types but does not have access to either the Leads records or the Tickets records as these are missing.

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode>0</ReturnCode>
            <ReturnDescription>Success</ReturnDescription>
            <ReturnRecordCount>6</ReturnRecordCount>
        </RequestStatus>
        <GetCustomFields_Return>
            <CustomFields>
                <CustomField id=”1” type="Value" value="XXX"/>
                <CustomField id=”2” type="YesNo" value="Yes">
                    <CustomFieldList>
                        <CustomFieldListItem>Yes</CustomFieldListItem>
                        <CustomFieldListItem>Yes</CustomFieldListItem>
                    </CustomFieldList>
                </CustomField>
                <CustomField id=”3” type="List" value="Gold">
                    <CustomFieldList>
                        <CustomFieldListItem>Gold</CustomFieldListItem>
                        <CustomFieldListItem>Silver</CustomFieldListItem>
                        <CustomFieldListItem>Bronze</CustomFieldListItem>
                    </CustomFieldList>
                </CustomField>
            </CustomFields>
        </GetCustomFields_Return>
    </WebAPI>
</TrackerRMS>