Skip to content

Commit

Permalink
by default, list opportunities before contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jereze committed Apr 23, 2018
1 parent fa69e14 commit 4a1ee21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salesforce_search.py
Expand Up @@ -133,7 +133,7 @@ def main(wf):
sf = salesforce_api.Salesforce(wf, access_token, refresh_token, instance_url)

results = sf.api_call('/services/data/v40.0/search/', parameters={
'q': "FIND {%s} IN ALL FIELDS RETURNING Account (Id, Name, Type), Contact (Id, Name, Email), Opportunity (Id, Name, StageName, CloseDate), Lead (Id, Name) WITH METADATA='LABELS' " % query.replace("\\", "\\\\").replace("'", "\\'")
'q': "FIND {%s} IN ALL FIELDS RETURNING Account (Id, Name, Type), Opportunity (Id, Name, StageName, CloseDate), Contact (Id, Name, Email), Lead (Id, Name) WITH METADATA='LABELS' " % query.replace("\\", "\\\\").replace("'", "\\'")
})

for r in results.get('searchRecords', []):
Expand Down

0 comments on commit 4a1ee21

Please sign in to comment.