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
trick12trick12 

Query problem

Hi Friends,

 

I am trying to pull out data from one instance.Here comes the situation.I have,for example, 10 custom  price books in one instance and I just wants to move data under two custom price books to another instance.When I use data loader to export data from the custom price books I get  all data which is listed under 10 books including standard price book,I do not want that.Is there a way to just directly extract data under the two custom price books into the excel sheet.?Please help.

 

Thanks,

Trick

HarmpieHarmpie

1) Extract your pricebooks (Pricebook2)

2) Find the Id's for the pricebooks you need

3) Extract the PriceBookEntry records where PriceBook2Id is equal to the Id's from 2)

4) Extract the products (Product2) that have a Product2Id occurance in the results from 3)

TrickTrick

Thanks for the help,

 

I have not been able to implement step 4.I have not been able to put it as a query.Morever,I do not see product2id as one of the options in drop down box .Hence ,I am not able to equate any values to the product2id after extracting values from the product2.

 

Morover,I see so many different product2ID .How do you want me to go from here.I am not sure what I have to do to get it work.Can u please help me with it soon. As of now step 4 is causing me a lot of problem 

 

Thanks,

Trick

HarmpieHarmpie

If youre using the dataloader, the query you need is

 

SELECT Id, Product2Id, PriceBook2Id FROM PricebookEntry WHERE PriceBook2Id IN ('a-pricebook-id' , 'another-pricebook-id')

TrickTrick

Hey Thanks a lot,

 

I think I got it .However I will try it once again to be very sure of the outcome .If I need any more help I will come back to you.

 

Thanks,

Trick