A check request will not include the detail lines of the check unless you include it in your query. By adding the IncludeLineItems
setting, you'll get access to the Expense or Item lists of the check (a check could have Expense lines, Item lines, or both). You'll want to change to include the following:
ICheckQuery checkQuery = requestMsgSet.AppendCheckQueryRq();
checkQuery.IncludeLineItems.SetValue(true);
IMsgSetResponse msgSetRs = rp.DoRequests(requestMsgSet);
I would also suggest that you check the response code before trying to get the response detail so you can better handle errors:
IResponse response = msgSetRs.ResponseList.GetAt(0);
if(response.StatusCode != 0)
{
// There was an error. response.StatusCode has the error number
// response.StatusMessage has the error description.
}
else
{
ICheckRetList checkRetList = (ICheckRetList)response.Detail;
.
.
.
}