HI all,
I'm trying to apply the amounts to the posted invoices by using CreditMemos in GP. It is throwing an exception as "Object reference not set to an instance of an object." at the last line which is in BOLD letters.Below is the sample code . Please tell me where i'm missing.
RMApplyType[] rmarray = new RMApplyType[1];
taRMApply taApplyArray = new taRMApply();
decimal amount = 150;
taApplyArray.APFRDCTY = 7;
taApplyArray.APFRDCNM = "CREDT000000000034";
taApplyArray.APTODCTY = 1;
taApplyArray.APPLYDATE = System.DateTime.Now.ToString();
taApplyArray.APPTOAMT = amount;
taApplyArray.APTODCNM = "STDINV027";
rmarray[0].taRMApply = taApplyArray;
Regards,
CB.
*This post is locked for comments