Expression evaluation error at function a!queryEntity [line 6]: An error occurred while retrieving the data.

Certified Lead Developer
I am receiving below error when I try to execute the query entity rule qith below code
------------------------------
load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20
),
a!queryEntity(
entity: cons!MERCP_DSE_TEST_DS,
query: a!query(
pagingInfo: local!pagingInfo
)
).data
)

--------------------------
However same code works when i just insert query selection in above code


load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 20
),
a!queryEntity(
entity: cons!MERCP_DSE_TEST_DS,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(
field: "CreateUser"
)
}
),

pagingInfo: local!pagingInfo
)
).data
)

----------------------

No error in a...

OriginalPostID-261209

  Discussion posts and replies are publicly visible

Parents
  • @ajinkyab277, I tried the same thing as you mentioned.
    The code snippet is:
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),


    a!queryEntity(
    entity: cons!EMP_ENTITY_EMPLOYEE,

    query: a!query(
    pagingInfo: local!pagingInfo
    )
    )

    )

    Now, first I typed it manually - and it was not formatted and then tested, I got the same error as you - "An Error occurred while retrieving the data: line 7".
    Then I just formatted the code using Ctrl+Shift+F in the expression editor.
    And then it started working fine.

    I know this sounds very strange, but this is what I observed
Reply
  • @ajinkyab277, I tried the same thing as you mentioned.
    The code snippet is:
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),


    a!queryEntity(
    entity: cons!EMP_ENTITY_EMPLOYEE,

    query: a!query(
    pagingInfo: local!pagingInfo
    )
    )

    )

    Now, first I typed it manually - and it was not formatted and then tested, I got the same error as you - "An Error occurred while retrieving the data: line 7".
    Then I just formatted the code using Ctrl+Shift+F in the expression editor.
    And then it started working fine.

    I know this sounds very strange, but this is what I observed
Children
No Data