i need to update some columns on the screen “Incoming Customer Order”.
And I use this API: EXTERNAL_CUST_ORDER_LINE_API.MODIFY__(info_ , objid_, objversion_, attr_, action_)
How can I set the parameters “info” and “objid”?
What values does it expect here?
I can’t find them in the table “EXTERNAL_CUST_ORDER_LINE_TAB”
Page 1 / 2
Hi everybody,
thank you a lot for supporting. Now it works perfectly.
Don’t worry @hhy38. I know. And is already deactivated.
@Link You should do this in your test environment. Please don't do it in your production environment. :)
@Link Please disable the Event. After that, check one of them. This is an important point. If there are a lot of jobs in the background. Your system can slow down or even crash.
@Link
I explained everything in my post, you just have to transfer your code into your custom procedure
Thank you @romsar I will test this process also.
You already sent it with this code. If there is no change. There should be an error in background jobs. You can search with description. And check the error text.
ifsapp.transaction_sys.deferred_call(job_id_, 'Fnd_Event_Action_API.Action_Executeonlinesql', 'PARAMETER', attr_, 'Geri plan Tanımı');
OK, I got it. But now I have > 100 jobs. Every second. And it calculate the value n times until zero. :-)
You already sent it with this code. If there is no change. There should be an error in background jobs. You can search with description. And check the error text.
ifsapp.transaction_sys.deferred_call(job_id_, 'Fnd_Event_Action_API.Action_Executeonlinesql', 'PARAMETER', attr_, 'Geri plan Tanımı');
@Link
I explained everything in my post, you just have to transfer your code into your custom procedure
Hi @hhy38
how can I send the above code as a background job?
I’ve intergrated the second code in my event. I don’t get any error messages but the values didn’t change.
Hi @hhy38
thank you for the new code but the same error message, unfortunately.
@Link You should send this task as a background job. There is a template below.
DECLARE attr_ VARCHAR2(32000); sql_msg_ VARCHAR2(32000); stmt_ VARCHAR2(32000); job_id_ NUMBER; BEGIN stmt_ := ' BEGIN
WHEN IFSAPP.Error_SYS.Err_Security_Checkpoint THEN
raise;
WHEN OTHERS THEN
rollback;
raise;
COMMIT;
END;
@Link Hi,
Can you the plsql block? Writing from screenshots is hard. :)
Hi guys,
many thanks for helping. The code works in PLSQL. But in IFS I get the following error message:
My code:
Why is the record locked?
@Link
You are welcome
Let me explain simply. Attr is a varchar variable. It is used to send the data to the database. We fill the attr with column values with the add_to_attr procedure. After sending this. The APIs unpack the attr and insert it into tables.
The first parameter is the column in the table that you want to update.
The second parameter is the new value of the column.
If you want to change multiple records. You should use a loop. There is an example below.
DECLARE info_ VARCHAR2(32000); objid_ VARCHAR2(32000); objversion_ VARCHAR2(32000); attr_ VARCHAR2(32000); BEGIN FOR rec_ IN (SELECT t.objid, t.objversion FROM fnd_user t WHERE t.identity IN ('username1','username2','username3')) LOOP client_sys.clear_attr(attr_); client_sys.add_to_attr('ACTIVE', 'FALSE', attr_); fnd_user_api.modify__(info_, rec_.objid, rec_.objversion, attr_, 'DO'); END LOOP; END;
Hi @hhy38
it is a nice example.
client_sys.add_to_attr('ACTIVE', 'FALSE', attr_);
For what purpose do I need this method?
What do the first and second parameters mean?
Just once at the beginning is going to be enough. If you clear again, you will lose the info before. However, If you change multiple records. You need the clear the attr.
My goal is to change multiple records. That means I need to clear the attr again.
Many thanks for the valuable information. :-)
Hi @romsar
hi @Tomas Ruderfelt
thank you a lot for support. I will test this approach.
Just once at the beginning is going to be enough. If you clear again, you will lose the info before. However, If you change multiple records. You need the clear the attr.
Hi @Link
To modify a record. You must know the objid and the obversion of the record. You can get this information from view. After that, fill the attr with columns and values. You can see an example below.
DECLARE info_ VARCHAR2(32000); objid_ VARCHAR2(32000); objversion_ VARCHAR2(32000); attr_ VARCHAR2(32000); BEGIN
SELECT t.objid, t.objversion INTO objid_, objversion_ FROM fnd_user t WHERE t.identity = 'DUMMY_USER';