Skip to main content

Hi,

 

When a new record is created on the Document Revision screen, I want IFSAPP to automatically be the responsible person of the uploaded document for a certain document class.

 

I tried to do this as an event but it doesn't seem possible. How can I do this?

@betul.bastan_12 refer to this thread regarding a custom event/action.

 


Thanks for your answer.
The questioner is my teammate :)
I can't use the Change Responsible Person function with an event. The event trigger and the table that the event will change are not accepted to be the same. I was trying to find an alternative solution for this.


Hi ​@betul.bastan_12 ,

You are right that that is not possible in case the event and the action are on the same logical unit.

But maybe you can think of another Logical Unit whet you set the event, like the Document Title (LU DocTitle), the document file LU EdmFile), or document access (LU DocumentIssueAccess). 

Hope this will help you,

Robert Kool


Hi ​@EqeRobertK 

 

First of all thank you for your answer.
I tried this with EdmFile LU but I get the error in the attachment.

 


Thanks for your answer.
The questioner is my teammate :)
I can't use the Change Responsible Person function with an event. The event trigger and the table that the event will change are not accepted to be the same. I was trying to find an alternative solution for this.

There are ways described around the trigger and mutating table problem here on IFS Community.


Thanks for your answer.
The questioner is my teammate :)
I can't use the Change Responsible Person function with an event. The event trigger and the table that the event will change are not accepted to be the same. I was trying to find an alternative solution for this.

There are ways described around the trigger and mutating table problem here on IFS Community.

@Mathias Dahl  

Yes, when I researched these and tried to adapt them to my own scenario, I was not successful at first, but I found a solution. Thank you.

 

source that helped me ; https://dsj23.me/2021/08/27/tips-to-avoid-mutating-table-error-in-ifs-event-actions/

 


Thanks for your answer.
The questioner is my teammate :)
I can't use the Change Responsible Person function with an event. The event trigger and the table that the event will change are not accepted to be the same. I was trying to find an alternative solution for this.

There are ways described around the trigger and mutating table problem here on IFS Community.

@Mathias Dahl  

Yes, when I researched these and tried to adapt them to my own scenario, I was not successful at first, but I found a solution. Thank you.

 

source that helped me ; https://dsj23.me/2021/08/27/tips-to-avoid-mutating-table-error-in-ifs-event-actions/

 

@betul.bastan_12 

Good to hear! 😃💪🏻

Would you have time to share the final solution with the community? I'm sure others would be interested.

Thanks!


Of course I'd like to help.

 

The code block I used for the event is like this

 

DECLARE
attr_ VARCHAR2(32000);
job_id_ NUMBER;

BEGIN

client_sys.Clear_Attr(attr_);
client_sys.Add_To_Attr('DOC_CLASS_', '&NEW:DOC_CLASS', attr_);
client_sys.Add_To_Attr('DOC_NO_', '&NEW:DOC_NO' , attr_);
client_sys.Add_To_Attr('DOC_SHEET_', '&NEW:DOC_SHEET', attr_);
client_sys.Add_To_Attr('DOC_REV_', '&NEW:DOC_REV' , attr_);
client_sys.Add_To_Attr('NEW_OWNER_', 'IFSAPP' , attr_);
client_sys.Add_To_Attr('OLD_OWNER_', '&NEW:DOC_RESP_SIGN' , attr_);
client_sys.Add_To_Attr('DEL_OLD_ACCESS_LINE_', 'TRUE' , attr_);



IFSAPP. Transaction_SYS.Deferred_Call('DOC_ISSUE_API.Update_Doc_Resp_Person', 'PARAMETER',attr_,'Change Resp Person');
END;

Transaction_SYS.Deferred_Call  ->This function creates a background job.


Reply