I tried accessing the Credit Memo subtab.
var objCustomerPayment = record.load({ type: record.Type.CUSTOMER_PAYMENT, id: 923 });
var getLineCreditMemoCount = objCustomerPayment.getLineCount("credit");
and I'm getting "-1" in my logs.
enter image description here