function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DrKelly76DrKelly76 

Python query for Opportunity ID

I have a list of Names in excel that I need to search for the Opportunity ID.  I have got it to work for just one name, but I'm unsure of how I take this massive excel list of names and retrieve the Opportunity ID?  Any Ideas I could try?

 

>>> query_result = svc.query("select id, Name from opportunity where Name like 'Customer A Tire Place%'")
>>> for rec in query_result[sf.records:]:
...     print str(rec[2]) + " : " + str(rec[3])
...
00xx000000XXXJbXXX : Customer A Tire Place
>>>

 

Thanks for your time,


DK

Best Answer chosen by Admin (Salesforce Developers) 
DanSadDanSad

Hiya,

Best bet: Use an excel-embedded python framework like IronSpread (Or DataNitro or whatever they call it now). 

All Answers

DanSadDanSad

Hiya,

Best bet: Use an excel-embedded python framework like IronSpread (Or DataNitro or whatever they call it now). 

This was selected as the best answer
DrKelly76DrKelly76

Thanks I'll check that out.