+ Start a Discussion
paschalpaschal 

Product Id

I need some help for the modification of an application, to integrate more products to come.
 
If I am right, the code use the key ProductId in the config file for the SF web service.
 
The key I have is this one for one product:
 
<add key="Salesforce.ProductId" value="00k30000000gxHo" />

Anyway I need  to integrate more products. So I need to know their Ids.

Do you know an easy way to retrieve this ID ?

Thanks

DevAngelDevAngel

Hi paschal,

That looks like greek to me.  What is this config file of which you speak?  app.config or something?  What is the app that you are modifying, asp.net, winforms?

The way to obtain a product id varies depending on context.  You can obtain it from a WIL merge field, by running a query on the product2 table, by running a query on the pricebookentry table etc.

ollieollie

Hi Dave,

The problem is that we have API v2.0 code that works fine in creating an opportunity and assigning a product to it. However we have now come to extend that code to add a different product to the opportunity (which we have created in SF) and although we have functioning code, we cannot locate the ID for our new product.

It appears that the changes from v2.0 to v2.5 of the API mean that we cannot use the web interface in SF to get the ID of the product we want to insert. Previously we grabbed the ID of the product from the end of the URL in Salesforce, plugged it into our code, and the product was inserted successfully. However now when we do that, the ID does not work. So the question is, how do we get the v2.0 API ID for a product?

We are keen not to upgrade our code to the v2.5 right now and are on a deadline, so we'd appreciate any light you can shed on this situation.

Ollie

DevAngelDevAngel

Hi ollie,

You should use the api query function to obtain the correct product ids.  Filter on pricebook id to get the products for the appropriate pricebook.