You need to sign in to do that
Don't have an account?
Susan Love 2
Change Code
We have existing code in our org which had been written when we had one product, we now have three other products. We require this code to be changed to include these other three products, code below:
List renewalProductList = [SELECT Id, Name, Descripton, ProductCode FROM Product2 WHERE ProductCode = 'SUBS-R'];
Can anybody help me change this code to enable it to recognise the other three products.
Thanks
Susan
List renewalProductList = [SELECT Id, Name, Descripton, ProductCode FROM Product2 WHERE ProductCode = 'SUBS-R'];
Can anybody help me change this code to enable it to recognise the other three products.
Thanks
Susan
1. Define a list and add all product codes ( Better if you do it using custom settings so that product codes can be added/removed without a change in code)
2. Add all your products to the list ( if your approach is custom settings, then get the values from custom settings and add them in the list
3. Update your query to pass this list as an argument to fileter the resulst
Regards
Lokesh
Susan