AcidAlfred
-
Posts
3 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by AcidAlfred
-
-
Thanks for the quick responses.
@deanishe Thank you for the Link
@wefikus It seems like there are no restricted IPs.
Below is the debugger output. I get the same error any time I start a "sf xxx" search. Logging in works fine.
Quote[2018-04-15 17:29:32][STDERR: input.scriptfilter] 17:29:32 workflow.py:2225 DEBUG Workflow version : 0.0.2
17:29:32 workflow.py:2633 DEBUG Got password : jereze.salesforce:access_token
17:29:32 workflow.py:2633 DEBUG Got password : jereze.salesforce:refresh_token
17:29:32 workflow.py:2633 DEBUG Got password : jereze.salesforce:instance_url
17:29:32 workflow.py:1628 DEBUG Reading settings from `/Users/xxx/Library/Application Support/Alfred 3/Workflow Data/jereze.salesforce/settings.json` ...
17:29:32 workflow.py:2423 DEBUG Set last run version : 0.0.2
17:29:32 workflow.py:2267 DEBUG Workflow finished in 0.135 seconds.
[2018-04-15 17:29:33][STDERR: input.scriptfilter] 17:29:32 workflow.py:2225 DEBUG Workflow version : 0.0.2
17:29:32 workflow.py:2633 DEBUG Got password : jereze.salesforce:access_token
17:29:32 workflow.py:2633 DEBUG Got password : jereze.salesforce:refresh_token
17:29:33 workflow.py:2633 DEBUG Got password : jereze.salesforce:instance_url
17:29:33 workflow.py:1628 DEBUG Reading settings from `/Users/xxx/Library/Application Support/Alfred 3/Workflow Data/jereze.salesforce/settings.json` ...
17:29:33 workflow.py:2423 DEBUG Set last run version : 0.0.2
17:29:33 workflow.py:2267 DEBUG Workflow finished in 0.121 seconds.
[2018-04-15 17:29:38][ERROR: input.scriptfilter] Code 1: 17:29:33 workflow.py:2225 DEBUG Workflow version : 0.0.2
17:29:33 workflow.py:2633 DEBUG Got password : jereze.salesforce:access_token
17:29:33 workflow.py:2633 DEBUG Got password : jereze.salesforce:refresh_token
17:29:33 workflow.py:2633 DEBUG Got password : jereze.salesforce:instance_url
17:29:38 salesforce_api.py:50 INFO API get call: https://eu10.salesforce.com/services/data/v40.0/search/?q=FIND+{lead}+IN+ALL+FIELDS+RETURNING+Account+(Id%2C+Name%2C+Type)%2C+Contact+(Id%2C+Name%2C+Email)%2C+Opportunity+(Id%2C+Name%2C+StageName%2C+CloseDate)%2C+Lead+(Id%2C+Name)+WITH+METADATA%3D'LABELS'+
17:29:38 salesforce_api.py:57 DEBUG [{"message":"\nFIELDS RETURNING Account (Id, Name, Type), Contact (Id, Name, Email)\n ^\nERROR at Row:1:Column:56\nNo such column 'Type' on entity 'Account'. 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.","errorCode":"INVALID_FIELD"}]
17:29:38 workflow.py:2243 ERROR API error when calling https://eu10.salesforce.com/services/data/v40.0/search/?q=FIND+{lead}+IN+ALL+FIELDS+RETURNING+Account+(Id%2C+Name%2C+Type)%2C+Contact+(Id%2C+Name%2C+Email)%2C+Opportunity+(Id%2C+Name%2C+StageName%2C+CloseDate)%2C+Lead+(Id%2C+Name)+WITH+METADATA%3D'LABELS'+ (400): [{"message":"\nFIELDS RETURNING Account (Id, Name, Type), Contact (Id, Name, Email)\n ^\nERROR at Row:1:Column:56\nNo such column 'Type' on entity 'Account'. 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.","errorCode":"INVALID_FIELD"}]
Traceback (most recent call last):
File "/Users/xxx/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.5E6052FE-B26B-4BBA-A171-21BC8E59264E/workflow/workflow.py", line 2236, in run
func(self)
File "salesforce_search.py", line 136, in main
'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("'", "\\'")
File "/Users/xxx/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.5E6052FE-B26B-4BBA-A171-21BC8E59264E/salesforce_api.py", line 58, in api_call
raise ValueError('API error when calling %s (%i): %s' % (r.url, r.status_code, r.text))
ValueError: API error when calling https://eu10.salesforce.com/services/data/v40.0/search/?q=FIND+{lead}+IN+ALL+FIELDS+RETURNING+Account+(Id%2C+Name%2C+Type)%2C+Contact+(Id%2C+Name%2C+Email)%2C+Opportunity+(Id%2C+Name%2C+StageName%2C+CloseDate)%2C+Lead+(Id%2C+Name)+WITH+METADATA%3D'LABELS'+ (400): [{"message":"\nFIELDS RETURNING Account (Id, Name, Type), Contact (Id, Name, Email)\n ^\nERROR at Row:1:Column:56\nNo such column 'Type' on entity 'Account'. 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.","errorCode":"INVALID_FIELD"}]
17:29:38 workflow.py:2267 DEBUG Workflow finished in 4.694 seconds. -
Search in Salesforce (Alfred worklfow)
in Share your Workflows
Posted
@jereze Thanks for your help and excuse the late feedback. Indeed the "type" field in our org was hidden. After making it visible the search is now working.
Do you think it would be possible to extend the workflow to be able to change e.g. the status of a lead?
Thanks a lot, this is great,
Benedikt