I need to know about following conditions.

1) I need to run a query on excel connector with where clause and IN operator.

Example -

 select id from pricebookentry where id IN (set of ids)

2) I need to apply AND condition in excel connector query.

Example -

select id from pricebookentry where pricebookid=1234 and product id=34455.

Please suggest the way to do this.

2 Answers 2


Consider using the excellent tool - Enabler4Excel ? https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000B3GBzEAN , It gives you a visual way to create and assess Salesforce queries.

This is a Microsoft Excel add-on enables easy mass updates, inserts, and deletes. Has extra functionality of determining which fields are in and out of layouts, as well as a tool for field(s) utilization calculation. VisualForce from layout page generation.

Salesforce Enabler for Excel connects your Excel spreadsheet right to your Salesforce.com database instance. It lets you do regular dataloader oprations like get, insert, update, delete, upsert, but without having to deal with .csv files. Everything is done right there in Excel. You can pull records from the database using a custom SOQL query, change a couple of fields, and push them back into the database. All in a couple of minutes and without leaving Excel. The add-on also contains some tools that can come in handy to a Salesforce administrator. It can run a set of layouts and in a couple of seconds generate a report containing all fields that are in the layouts, as well as all fields that are not in the layouts, which is invaluable for cleanup purposes.

VisualForce from layout generation tool will jump-start your VisualForce page development by generating a page from any existing layout.

  1. You have to set the (set of ids) as a question mark '?' so that it is a paramter in the query. Next, the paramter value should read from a cell. This cell should be a formula which concatenates the ids from your list of Ids. for example =CONCATENATE(A1,"','",A2,"','",.....)

  2. you have to put single quotes around 1234 and 34455 but that query should work just fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.