Skip to content

Calling an IFS PL/SQL API method (like Transport_Task_API.NEW__) from a custom .NET/WPF application to create a new record — how do you retrieve an output value from that call (like the newly generated record's ID) back into a .NET variable, without running a separate follow-up SQL query?

Answer

Declare an OUT-direction bind variable in your PL/SQL block and bind it through the FndPLSQLCommand's BindVariables collection. In the PL/SQL string itself, assign the value you want returned to a bind placeholder (for example, :OUTPUT := ifsapp.client_sys.get_item_value('YOUR_ATTRIBUTE', your_attr_string);), then in .NET code declare a matching FndTextAttribute object and register it with query.BindVariables.Add(New FndBindVariable(FndBindVariableDirection.Out, "OUTPUT", OUTPUT)) before calling query.ExecuteNonQuery(). After execution, the returned value is available directly at query.BindVariables("OUTPUT").Value.ToString() — this retrieves the output value in the same round-trip as the original call, without needing a separate follow-up SQL query to fetch it afterward.

← Browse Integrations and APIs questions