CRM API V2.0 Java SDK - Unable to Search a Record After Creating it.
We have a situation where we have created a new record in Accounts Module. In the same Java app if we try to search for it using the name criteria the API returns nothing. We go to the CRM and we see this new Accounts record. Following is the code snippet:
ZCRMRecord neworg = new ZCRMRecord("Accounts");
neworg.setFieldValue("Account_Name", "New Account");
orgresp = neworg.create();
The above code is successful.
After some lines of code we try to search for the "New Account" record:
searchCriteria = "Account_Name:equals:New Account";
ZCRMModule module3 = ZCRMModule.getInstance("Accounts");
BulkAPIResponse blk = module3.searchByCriteria(searchCriteria , 1, 1);
This returns empty.
Not sure what we are missing.