IFS Applications 10 PL/SQL API Call Generator for New__ and Modify__
This generator writes anonymous PL/SQL blocks that call an IFS Applications 9 or 10 logical unit API (New__ and Modify__) with a Client_SYS attribute string, the same path the client uses. Paste the output into the SQL Query Tool, IFS Developer Studio, SQL Developer or a custom event action to test a create or update without touching the tables directly.
Fill in
The <LU>_API package, e.g. Customer_Order_API, Purchase_Order_API, Inventory_Part_API.
The LU view that exposes OBJID and OBJVERSION, used to fetch the keys for Modify__.
CHECK validates without saving, DO validates and writes. Start with CHECK.
1. Show the default attributes (PREPARE)
SET SERVEROUTPUT ON DECLARE info_ VARCHAR2(32000); objid_ VARCHAR2(2000); objversion_ VARCHAR2(2000); attr_ VARCHAR2(32000); BEGIN Client_SYS.Clear_Attr(attr_); Customer_Order_API.New__(info_, objid_, objversion_, attr_, 'PREPARE'); -- attr_ now holds the default values the client would show on a new record. -- CHR(31) separates name from value, CHR(30) ends each item. Dbms_Output.Put_Line(REPLACE(REPLACE(attr_, CHR(31), ' = '), CHR(30), CHR(10))); END; /
2. Create a record with New__
DECLARE
info_ VARCHAR2(32000);
objid_ VARCHAR2(2000);
objversion_ VARCHAR2(2000);
attr_ VARCHAR2(32000);
BEGIN
-- Start from the defaults, then add your values (a later item in attr_ overrides an earlier one).
Client_SYS.Clear_Attr(attr_);
Customer_Order_API.New__(info_, objid_, objversion_, attr_, 'PREPARE');
Client_SYS.Add_To_Attr('CONTRACT', '1', attr_);
Client_SYS.Add_To_Attr('CUSTOMER_NO', 'CUST100', attr_);
Client_SYS.Add_To_Attr('WANTED_DELIVERY_DATE', TO_DATE('2026-11-30', 'YYYY-MM-DD'), attr_);
Customer_Order_API.New__(info_, objid_, objversion_, attr_, 'CHECK');
Dbms_Output.Put_Line('info: ' || info_);
Dbms_Output.Put_Line('objid: ' || objid_ || ' objversion: ' || objversion_);
-- Returned attr_ carries generated keys (for example ORDER_NO):
Dbms_Output.Put_Line(REPLACE(REPLACE(attr_, CHR(31), ' = '), CHR(30), CHR(10)));
-- COMMIT;
END;
/3. Update a record with Modify__
DECLARE
info_ VARCHAR2(32000);
objid_ VARCHAR2(2000);
objversion_ VARCHAR2(2000);
attr_ VARCHAR2(32000);
BEGIN
SELECT objid, objversion
INTO objid_, objversion_
FROM CUSTOMER_ORDER
WHERE order_no = 'C12345';
Client_SYS.Clear_Attr(attr_);
Client_SYS.Add_To_Attr('WANTED_DELIVERY_DATE', TO_DATE('2026-11-30', 'YYYY-MM-DD'), attr_);
Customer_Order_API.Modify__(info_, objid_, objversion_, attr_, 'CHECK');
Dbms_Output.Put_Line('info: ' || info_);
Dbms_Output.Put_Line('new objversion: ' || objversion_);
-- COMMIT;
END;
/Run as an IFS end user that has been granted the API through permission sets, not as the IFSAPP owner writing directly, and never INSERT or UPDATE the *_TAB tables. Attribute values for enumerations are client values unless you use the _DB attribute variant; check which one the LU expects. Mandatory attributes differ by LU and by configuration, so run block 1 first and debug a manual entry in the client to see the real attribute list. Test in a non-production instance and keep COMMIT commented until CHECK passes.
Get your IFS API block reviewed
Send the LU and the record you need to create or change and we will check the attribute list and action sequence against your Apps 9 or 10 update level.
Optional. The tool and every export work without this. No spam.
How to use it
Enter the API package (for example Customer_Order_API), its base view, and up to three attributes. Block 1 calls New__ with the action PREPARE, which returns the default values the client would show on a blank record, and prints them one per line. Block 2 starts from those defaults, appends your values with Client_SYS.Add_To_Attr and calls New__ with CHECK or DO. Block 3 fetches OBJID and OBJVERSION from the view for one record and calls Modify__. Keep the action on CHECK until the block runs clean: CHECK runs the validations without writing, DO validates and writes. COMMIT is commented out on purpose so you can roll back while testing.
- Run block 1 first to see which attributes the LU fills by default
- Use CHECK, read info_, then switch to DO
- Uncomment COMMIT only in a test instance you are allowed to change
The method: attr_ strings and the five-parameter signature
In IFS Applications every logical unit exposes New__ (info_, objid_, objversion_, attr_, action_) and Modify__ (info_, objid_, objversion_, attr_, action_). The attr_ string is a list of name and value pairs: CHR(31) separates a name from its value and CHR(30) ends each pair. Client_SYS.Clear_Attr empties it and Client_SYS.Add_To_Attr appends a pair, with overloads for text, numbers and dates, so a DATE goes in without string conversion. On return attr_ carries values the server set, such as a generated ORDER_NO. Modify__ needs the row's OBJID and current OBJVERSION; if someone changed the record after you read it, the call fails with a 'modified by another user' error instead of overwriting their change.
Worked example: customer order header
With the defaults, block 2 prepares a Customer_Order_API record, adds CONTRACT = 1, CUSTOMER_NO = CUST100 and WANTED_DELIVERY_DATE = 2026-11-30, and runs CHECK. If info_ comes back empty and no error is raised, the header would be valid. Switching to DO creates it and the printed attr_ shows the new ORDER_NO. Block 3 then moves the wanted delivery date on order C12345 by changing only that one attribute: Modify__ ignores attributes you do not send. Real order headers often need more, for example an order type or coordinator, depending on site defaults, which block 1 reveals.
Gotchas in Apps 9 and 10
Do not write to CUSTOMER_ORDER_TAB or any *_TAB table: you would skip the business logic, history and events. Enumeration attributes accept client values, which can be translated; the _DB variants (for example a STATE_DB style attribute where the LU offers it) are language independent. When you cannot work out an attribute name, turn on debug in the client while saving the record manually and read the attr_ that the client sends. Custom fields on an LU travel in a separate CF$_ structure through the custom fields API, not in the base attr_. On Apps 10 with Aurena the server logic is the same, so these blocks still apply.
Frequently Asked Questions
What is IFS Applications 10?
IFS Applications 10 is the on-premises ERP release from IFS that preceded IFS Cloud. It runs on an Oracle database with PL/SQL business logic organised in logical units, each with an _API package, and offers the Enterprise Explorer client and, from later updates, the Aurena web client. Code built on New__ and Modify__ works the same way in Apps 9 and 10.
What does PREPARE do in an IFS New__ call?
PREPARE asks the logical unit to fill attr_ with the default values for a new record, the same defaults the client shows when you press New. It does not insert anything. Use it to discover which attributes the LU fills automatically, then add your own values and call New__ again with CHECK or DO.
Why does my New__ call fail with a mandatory field error?
The LU validates every mandatory attribute during CHECK and DO. If you built attr_ from scratch with Clear_Attr you may be missing values the client normally defaults. Start from PREPARE as block 2 does, read the error text in the raised message, and add the missing attribute. Site and company settings can change which fields are required.
Can I use these blocks in a custom event action?
Yes, the same API calls work in an event action of type Execute Online SQL, but be careful: the action runs inside the triggering transaction, so do not COMMIT there, and avoid modifying the same LU that fired the event or you can loop. Test with CHECK first and keep the logic small.
If your team wants to ask IFS Applications questions in plain English on your own servers, with any write going through these APIs only after a person approves it, we can set that up.
Related Tools
IFS Applications 9/10 to IFS Cloud Upgrade Effort Calculator
Estimate the hours and weeks to move an IFS Applications 9 or 10 installation to IFS Cloud, driven by how many custom objects, reports, layered code changes and integrations you carry.
Developer ToolsIFS Applications Oracle SQL Query Generator
Fill in site and part to get read-only Oracle SQL against common IFS Applications views for shop orders, stock and customer orders.
Developer ToolsIFS Cloud Projection OData URL Builder
Fill in host, realm, projection and entity set to generate the token request and a ready OData GET URL for IFS Cloud projections.
ERP Migration & SelectionERP Data Migration Load Planner Worksheet
List each data object to migrate with record counts, cleansing progress and an estimated load time to plan trial loads and cutover.
More Other ERPs tools
See all- IFS Applications 10 Private AI Layer Blueprint Generator
- IFS Applications 10 AI Assistant Sizing and Value Calculator
- Infor VISUAL Work Order Status and Structure Reference
- Infor VISUAL Manufacturing Scheduling Checklist
- Infor XA (MAPICS) Period End Close Checklist
- Infor VISUAL Database Table Reference
- Infor XA (MAPICS) Application Module Reference
- IBM i Commands for Infor XA Administrators Reference
- Acumatica Generic Inquiry Design Template
Keep exploring
Free tools
- IFS Applications 10 Private AI Layer Blueprint GeneratorGenerate an architecture plan for a private AI assistant on on-prem IFS Applications 10: Oracle read-only copy, logical unit views, IFS Connect and projections, local GPU model, permissions and audit.
- IFS Applications 9/10 to IFS Cloud Upgrade Effort CalculatorEstimate the hours and weeks to move an IFS Applications 9 or 10 installation to IFS Cloud, driven by how many custom objects, reports, layered code changes and integrations you carry.
- IFS Applications 10 AI Assistant Sizing and Value CalculatorEstimate GPUs, document index size and monthly value for a private AI assistant on IFS Applications 10. Maintenance and engineering documents often dominate index size.
ERP fixes and how-tos
- IFS Applications 10 On-Prem AI Architecture: Keep Data on SitePrivate AI layer for on-prem IFS Applications 10: Oracle read-only copy, LU views, IFS Connect and projections, local GPU model, permissions and audit.
- Should We Upgrade from IFS Applications 10 to IFS Cloud?A blunt guide for CIOs weighing an IFS Applications 10 to IFS Cloud upgrade: what changes, where customisations hurt, how to scope it, and when to wait.
- How to Set Up Business Events and Actions in IFSConfigure IFS Business Events and Actions step by step: define triggers on an entity, enable the event, and bind an email, workflow, or webhook action.
AI on your ERP
- AI for IFS Cloud in aerospace and defense manufacturingAdd AI to IFS Cloud for aerospace and defense: projections, Aurena UX, Lobby, and engineer-to-order data, deployed on-prem or in your private cloud.
- AI for IFS Cloud Project Management: Cost, Schedule and Forecast Questions AnsweredPrivate AI on IFS Cloud projects: ask about budget versus actual, activities, milestones, forecasts and project material in plain English, read-only.
Integrations
- How to add WhatsApp to IFS CloudHow to connect WhatsApp Business to IFS Cloud using projections, Business Events and IFS Connect: order alerts, approvals and supplier replies into IFS.
- How to automate email in IFS CloudAutomate inbound email into IFS Cloud: supplier confirmations, customer POs and RFQs parsed from shared mailboxes and staged for review through projections.
Software
- IFS CloudIndependent guide to IFS Cloud, the ERP and enterprise asset and service platform: modules, integration options, limitations, alternatives and AI use cases.
- IFS Field Service ManagementIFS Field Service Management covers service orders, scheduling optimisation and mobile work within IFS Cloud. Modules, integrations, AI uses and alternatives.