Skip to main content

Hi,

I am new to IFS and I need to automate a process in IFS:

What PL/SQL procedure to call if I want to copy and paste a raw when a status is changed for Safety_Inspection ?

I have made a call that works when called directly in DB 


DECLARE
info_   VARCHAR2(2000);
objkey_         VARCHAR2(2000);
objversion_     VARCHAR2(2000);
attr_      VARCHAR2(2000);
calculated_plan_date_ DATE;
 

BEGIN

  calculated_plan_date_ := ADD_MONTHS(SYSDATE,3);     

 

Client_SYS.Add_To_Attr('SAFETY_INSPECTION_NO','33' , attr_);     
Client_SYS.Add_To_Attr('PLAN_DATE', calculated_plan_date_ , attr_);
Client_SYS.Add_To_Attr('SAFETY_INSPECTION_TEMP_NO', '3', attr_);            
Client_SYS.Add_To_Attr('SAFETY_INSPECTION_TYPE_NO', '24', attr_);       
Client_SYS.Add_To_Attr('COMPANY_ID', '01', attr_);             
Client_SYS.Add_To_Attr('LOCATION_ID', 'GRE', attr_);  

  

Safety_Inspection_API.New__(info_,objkey_, objversion_, attr_,'DO');
--Transaction_SYS.Deferred_Call('Safety_Inspection_API.New__',  attr_,'AUTOMATIC COPY SAFETY INSPECTION', sysdate, 'FALSE');

END;
 

How do I make it work in IFS event action?

Right now my challange is that i put some dummy values in this query is it possible to reuse as many values of the row as possible when creating a new raw. So what i really need is a COPY and PASTE function/API call

Any hints ?

Hi ​@surayya,

There would not be any specific COPY or PASTE function available within an API body.

Please write a Cursor to get the existing line(s) properties, and then add/pass all those properties into attributes.

Hope this helps!

 

Regards

Abdul Rehman


Reply