Hi Team, Is it possible to write a dynamic OQL query? My requirement is to get details from an entity using OQL query, but the entity will be selected by the user at run time. I have to pass the entity name selected by the user to the OQL query and return the corresponding results. I s it possible? Regards, Megha
Yes this is possible.
You would create the OQL query in a string variable and add the entity as a variable in the OQL query.
'SELECT table.field AS field1
FROM ' + $EntityVariable + ' AS table'
Check how OQL UI works. It does pretty much what you want: a user types in whatever OQL string to execute, and then dump the output into a table.
Yes. Take a look at the example that Arjen has supplied in the OQL module: