Skip to main content

Hello.
In this screen : ifsapf:tbwOverviewCustomerInvoiceItem_Ext

 

We added a persistant CF, formatted as text.

The user would like to enter a datum to this specific field, without editing any standard field :

 

But an error occurs, preventing to fill the field :

 

@romsar updating persistent CF will be treated by the same validations as if you try to change amounts / payment terms once the invoice has been printed. All edits (standard and custom fields) can only be done when the Invoice is in Preliminary status and financial postings were not created.

I’m afraid there’s no way around that unfortunately.


Hi @romsar 

did you try to edit the field in status planned?

It isn’t possible to chang a field (also CF) in status Picked, Invoiced/Closed, Delivered etc.


Hello. 
The update must be done independently of the invoice status.
I will report that IFS can’t make that possible, I will see how we will proceed, say, making a read only CF


Maybe you can think about a custom event that allows you to update the field in any state.


Hi @romsar 

did you try to edit the field in status planned?

It isn’t possible to chang a field (also CF) in status Picked, Invoiced/Closed, Delivered etc.

@Link I guess what @romsar needs to update is Customer Invoice Line. Once the Customer Invoice is created → it goes in Preliminary status. While it’s in preliminary status it can be edited. But once the user will Print the Invoice it goes to Printed -> PostedAuth status, that’s the moment when the financial postings will happen and no more updates are accepted in the Customer Invoice or Customer Invoice Line.

Custom event should do a direct update. Is invoice_item_api.modify_ is used, it will still undergo the same validations and fail 😥


@Link I made the following test via sql developper :

DECLARE

   -- p0 -> __lsResult

   p0_ VARCHAR2(32000) := NULL;

   -- p1 -> __sObjid

   p1_ VARCHAR2(32000) := 'ABCDEFGH';

   -- p2 -> __g_Bind.s 0]

   p2_ VARCHAR2(32000) := 'CF$_NEW_INVOICE_NO'||chr(31)||'123'||chr(30);

   -- p3 -> __lsAttr

   p3_ VARCHAR2(32000) := 'SERVER_CHANGE'||chr(31)||'FALSE'||chr(30);

   -- p4 -> __sAction

   p4_ VARCHAR2(32000) := 'DO';

BEGIN

     p3_:='';

     IFSAPP.CUSTOMER_ORDER_INV_ITEM_CFP.Cf_Modify__(p0_ , p1_ , p2_ , p3_ , p4_ );

     COMMIT;

END;

 

And surprisely, that works very well. About using an event, I can’t see how that would work, as me as a user, I can’t save any new data on IFS if the invoice is in preliminary  status...


Hi @romsar 

you are right. Using of APIs wont work in IFS.

It should only work with the IFSAPP user if you use an update statement.


Reply