getSearchRecordsByPDC Method

 Purpose

You can use this method to search the values based on predefined columns and custom lookup fields.

 Request URL

XML Format:
https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?newFormat=1

JSON Format:
https://<APPDOMAIN>/crm/private/json/Leads/getSearchRecordsByPDC?newFormat=1

 Auth Token

Auth Token is an encrypted alphanumeric string that is required to authenticate your CRM account credentials. A valid user's Authentication Token is necessary to access the API. When making an API request, send the authentication token in the Authorization header as shown below:

https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?newFormat=1

Header:

Authorization=1000XXXX65.1000XXXX44.caXXXXXXXXXXXX

(See Using Authentication Token )

 Request Parameters

ParameterData TypeDescription
selectColumns*StringAll or module(field 1,field 2,field 3, field n...)
Example: leads(Last Name,Website,Email)
searchColumn*String

Specify the predefined search column (Please refer to the Default Predefined Columns  shown below).
Note: You can also search values based on custom lookup fields.

searchValue*StringSpecify the value to be searched
newFormatIntegernewFormat=1: To exclude fields with "null" values while inserting data from your CRM account.
newFormat=2: To include fields with "null" values while inserting data from your CRM account.
versionIntegerversion = 1: (Default value) This will fetch responses based on the earlier API implementation i.e prior to the enhancements made.
version = 2: This will fetch responses based on the latest API implementation.

* - Mandatory parameter

Note:

  • Refer the Release Notes  page to learn more about enhancements made in the API implementation.

 Default Predefined Columns

ModuleFields
Leads
  • email
Accounts
  • accountid
  • accountname
Contacts
  • contactid
  • accountid
  • vendorid
  • email
Potentials
  • potentialid
  • accountid
  • campaignid
  • contactid
  • potentialname
Campaigns
  • campaignid
  • campaignname
Cases
  • caseid
  • productid
  • accountid
  • potentialid
Solutions
  • solutionid
  • productid
Products
  • productid
  • vendorid
  • productname
Purchase Order
  • purchaseorderid
  • contactid
  • vendorid
Quotes
  • quoteid
  • potentialid
  • accountid
  • contactid
Sales Orders
  • salesorderid
  • potentialid
  • accountid
  • contactid
  • quoteid
Invoices
  • invoiceid
  • accountid
  • salesorderid
  • contactid
Vendors
  • vendorid
  • vendorname
Tasks
  • taskid
Events
  • eventid
Notes
  • notesid

 Examples

https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?newFormat=1&selectColumns=leads(Last Name,Website,Email)&searchColumn=email &searchValue=abc@testingdomain.com

 Leads with email column

https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?selectColumns=Leads(Last Name,Website,Email)
&searchColumn=email
&searchValue=test@test.com

 Leads with campaignid column

https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?selectColumns=Leads(Last Name,Website,Email)
&searchColumn=campaignid
&searchValue=2000000017011

 Contacts with vendorid column

https://<APPDOMAIN>/crm/private/xml/Contacts/getSearchRecordsByPDC?selectColumns=Contacts(Contact Owner,Lead Source,First Name,Last Name,Account Name)
&searchColumn=vendorid
&searchValue=2000000017022

 Products with vendorid column

https://<APPDOMAIN>/crm/private/xml/Products/getSearchRecordsByPDC?selectColumns=Products(Product Owner,Product Name,Product Code,Manufacturer,Product Category,Unit Price)
&searchColumn=vendorid
&searchValue=2000000017022

 SalesOrders with accountid column

https://<APPDOMAIN>/crm/private/xml/SalesOrders/getSearchRecordsByPDC?selectColumns=SalesOrders(SO Number,Subject,Due Date,Carrier,Status)
&searchColumn=accountid
&searchValue=2000000017003

 Search records using custom lookup fields

https://<APPDOMAIN>/crm/private/xml/Leads/getSearchRecordsByPDC?searchColumn=ProductLookup_ID
&searchValue=108149000062016

This will return a response like below:

<Leads>
<row no="1">
<FL val="LEADID">108490000020024</FL>
<FL val="SMOWNERID">1081490000078001</FL>
<FL val="Lead Owner">John</FL>
<FL val="Company">Zylker Inc.</FL>
<FL val="Last Name">Scott</FL>
<FL val="SMCREATORID">1081490000078001</FL>
<FL val="Created By">John</FL>
<FL val="MODIFIEDBY">1081490000078001</FL>
<FL val="Modified By">John</FL>
<FL val="Created Time">2014-10-27 15:18:11</FL>
<FL val="Modified Time">2014-11-26 12:53:13</FL>
<FL val="Last Activity Time">2014-11-26 12:53:13</FL>
<FL val="ProductLookup_ID">108149000062016</FL>
<FL val="ProductLookup">CPU</FL>
</row>
</Leads>

 Test Program

You can use the attached program to run and test the working of the getSearchRecordsByPDC method in your Java Environment.
The Java Program contains the following:

  • the authtoken generation format
  • the parameters and their values
  • actual usage of the method

Click here  to download the program