I am trying to instantiate

public WMB_AccountBillingInfoService.Unpaid[] Remittance;


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

What will be the correct way? Please help.

  • 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 May 31 '17 at 17:09

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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.