0

I am trying to instantiate

public WMB_AccountBillingInfoService.Unpaid[] Remittance;

as

WMB_AccountBillingInfoService.BillLocation[] billloc = custbill.BillLocation; 
    WMB_AccountBillingInfoService.Unpaid[] openRem= billloc.Remittance; 

What will be the correct way? Please help.

1
  • Is custbill.BillLocation a list? If so, you'd have to iterate through your BillLocation objects to get all the Unpaid objects out of them.
    – sfdcfox
    Commented May 31, 2017 at 17:09

1 Answer 1

2

You are trying to access Remittance from List. That's why you are getting that error.

You need to loop through the list and access Remittance from the SObject as follows:

WMB_AccountBillingInfoService.BillLocation[] billloc = custbill.BillLocation; 

for(WMB_AccountBillingInfoService.BillLocation billlocObj:billloc)
{
    WMB_AccountBillingInfoService.Unpaid[] openRem = billlocObj.Remittance;
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .