1
votes

I made a dynamic action in apex, of type Execute javascript code. Now I need to create a query (with javascript code) like

SELECT column FROM table WHERE condition

and store the result in a variable. I expect the result to be a string and store it in a variable.

I can't find a way to do this in the Internet. Probably I do not know the right wording because I have zero experience in javascript.

I guess there is a specific javascript or Apex API function call to do a query (What is the function name?)

1

1 Answers

0
votes

I would use Execute PL/SQL code option instead and put PL/SQL code there.

begin
  select column_name into variable_name 
from table 
where condition;

end;

You migh use declare statement if varable was not known before.