Hi There,
Working with 2023 R1.
I am trying to run the following query through PostMan
http://AcumaticaVM/AcumaticaDemoDB/ODatav4/PX_Objects_GL_GLTran?$apply=groupby((AccountID,BranchID,LedgerID,FinPeriodID),aggregate(DebitAmt with sum as SumDebitAmt))
And Acumatica is coming back with the following error:
"error": {
"code": "",
"message": "An error has occurred.",
"innererror": {
"message": "Object reference not set to an instance of an object.",
"type": "System.NullReferenceException",
"stacktrace": " at PX.Data.SQLTree.SQLinqExecutor.SQLinqExpressionVisitor.VisitDacProperty(Type propertyType, String propertyName, SQLExpression defaultExpression)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqExpressionVisitor.VisitMember(MemberExpression expression)\r\n at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression expression)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqExpressionVisitor.Visit(Expression expression)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqExpressionVisitor.VisitMemberInit(MemberInitExpression expression)\r\n at Remotion.Linq.Parsing.ThrowingExpressionVisitor.Visit(Expression expression)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqExpressionVisitor.Visit(Expression expression)\r\n at PX.Data.SQLTree.Async.AsyncSQLinqExecutor.AsyncSQLinqExpressionVisitor.GetSQLProjectionFromAsyncVisitor(SQLinqBqlCommandInfo info, PXGraph g, Expression linqExpression, IDictionary`2 tableAliases)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqQueryModelVisitor.SetupSelection(Expression selector)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqQueryModelVisitor.VisitSelectClause(SelectClause selectClause, QueryModel queryModel)\r\n at PX.Data.SQLTree.SQLinqExecutor.SQLinqQueryModelVisitor.VisitQueryModel(QueryModel queryModel)\r\n at PX.Data.SQLTree.Async.AsyncSQLinqExecutor.ExecuteCollectionAsync[T](QueryModel queryModel)\r\n at PX.Data.SQLTree.Async.AsyncSQLinqExecutor.<ExecuteCollectionAsync>d__2`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n
I am a newbie to odata for sure, but all the exmple I can find on line, make me think this should be legal.
Any ideas?
Many thanks in advance,
Daniel Graham