Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Error when doing search using the ListContainer component #4

@pedramsaleh

Description

@pedramsaleh

I'm doing a search on a ListContainer object using the following code:

 <ListContainer 
          type='Contact'
          style={styles.container}
          fields={['Name', 'Title', 'PhotoUrl', 'Email', 'Phone']}
          where={this.state.searchTerm ? "Name LIKE '%" + this.state.searchTerm + "%'" : null} >

When I update the searchTerm state variable, the list is filtered and displays the expected results, but I get errors in my console output. For some reason, it looks like it's trying to select GoogleSearch, GoogleMaps, SendGmail and YahooWeather from my contact object, but those fields do not exist. Why would it be trying to select those fields?

Here is the console output:

SFNetReactBridge.sendRequest succeeded
react.force.common.js:36 SFNetReactBridge.sendRequest called: {"endPoint":"/services/data","path":"/v36.0/query","method":"GET","queryParams":{"q":"SELECT Salutation,FirstName,LastName,Title,AccountId,Phone,Email,MobilePhone,OwnerId,Name,ReportsToId,MailingAddress,OtherAddress,Fax,LeadSource,HomePhone,LastCURequestDate,OtherPhone,LastCUUpdateDate,AssistantName,Birthdate,AssistantPhone,Department,Description,CreatedById,CreatedDate,LastModifiedById,LastModifiedDate,GoogleSearch,GoogleMaps,SendGmail,YahooWeather,Id FROM Contact WHERE Id='00341000004wG4WAAU' OR Id='00341000004wG4YAAU' OR Id='00341000004wG4ZAAU' OR Id='00341000004wG4bAAE' OR Id='00341000004wG4cAAE' LIMIT 200"},"headerParams":{}}
react.force.common.js:41 SFNetReactBridge.sendRequest failed: {"message":"sendRequest failedError Domain=CSFNetworkErrorDomain Code=400 "\nLastModifiedById,LastModifiedDate,GoogleSearch,GoogleMaps,SendGmail\n ^\nERROR at Row:1:Column:322\nNo such column 'GoogleSearch' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names." UserInfo={NSLocalizedFailureReason=INVALID_FIELD, isAuthenticationFailure=false, NSLocalizedDescription=\nLastModifiedById,LastModifiedDate,GoogleSearch,GoogleMaps,SendGmail\n ^\nERROR at Row:1:Column:322\nNo such column 'GoogleSearch' on entity 'Contact'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names., action=<SFRestAPISalesforceAction: 0x7fa78f7d6760, GET "/query" (0.00)>}"}
YellowBox.js:69 Possible Unhandled Promise Rejection (id: 3):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions