Hello, Does anybody knows why am I getting a “CA Error The TranDate value of the CADailySummary table is incorrect because it contains a time component. The format must be yyyy-mm-dd” when trying to save an ARPayment record.
My code is:
ARPaymentEntry graphPAY = PXGraph.CreateInstance<ARPaymentEntry>();
ARPayment payment = new ARPayment();
payment.DocType = "PMT";
payment.ExtRefNbr = paymentRecord.tid;
payment.CustomerID = salesOrders.CustomerID;
payment.AdjDate = creationDate;
payment.DocDesc = ihubOrder.storeCode;
payment.CuryOrigDocAmt = paymentRecord.value;
//payment.AdjFinPeriodID = creationDate.ToString("MM-yyyy");
PaymentMethod method = SelectFrom<PaymentMethod>.Where<PaymentMethodExt.usrMarketPlacePaymentMethod.IsEqual<@P.AsString>>.View.Select(graphSO, paymentRecord.group);
if (method != null)
{
payment.PaymentMethodID = method.PaymentMethodID;
}
else
{
payment.PaymentMethodID = "DEFAULT"; //DEFAULT
}
CashAccount cashAcc = SelectFrom<CashAccount>.Where<CashAccount.cashAccountCD.IsEqual<@P.AsString>>.View.Select(graphSO, "BANAMEX001"); // BANAMEX001
if (cashAcc != null)
{
payment.CashAccountID = cashAcc.CashAccountID;
}
graphPAY.Document.Insert(payment);
graphPAY.Actions.PressSave();
I hope somebody could help me. I just can’t fin the light on this issue.
Thanks in advance.