You need to sign in to do that
Don't have an account?
Alex Raine 9
Get count of records based on field value
Hi All,
I was wondering if anyone would be able to assist me with the below:
I have a custom object called Emergecny Stock Order which has a child object called Emergecny Stock Order Lines that has a field called Product
I need to use apex code to group all the order lines related to the same emergency stock order by Product. I then need to be able to identify how many records are within each group (i.e how many order lines have the same product and are related to the same emergency stock order). This is so i cna perform a particular action if a group contians more than 1 record.
Regards
I was wondering if anyone would be able to assist me with the below:
I have a custom object called Emergecny Stock Order which has a child object called Emergecny Stock Order Lines that has a field called Product
I need to use apex code to group all the order lines related to the same emergency stock order by Product. I then need to be able to identify how many records are within each group (i.e how many order lines have the same product and are related to the same emergency stock order). This is so i cna perform a particular action if a group contians more than 1 record.
Regards
Emergency_Stock_Order__c
Emergency_Stock_Order_Lines__c
Product1__c