You need to sign in to do that
Don't have an account?
Master Details field in where condition
hi,
i am trying to use Master-Detail field in where condition like:
public List<ECS__eCommSource_Order_Line__c> getLineOrders(){
string num = ApexPages.currentPage().getParameters().get('orderId');
List<ECS__eCommSource_Order_Line__c> orders = [select ECS__Product__c, ECS__Quantity__c, ECS__Tax__c, ECS__Shipping__c, ECS__Order_Line_Total__c, ECS__Unit_Price__c from ECS__eCommSource_Order_Line__c WHERE ECS__Order__c = : num];
return orders;
}
ECS__Order__c is Master Details field in ECS__eCommSource_Order_Line__c object. i have number of records in this object but this query return empty record.
help me.
string num = ApexPages.currentPage().getParameters().get('orderId'); is null
put a debug statement and check if " num "has any value.
how are you passing the orderId to this vf page