Skip to main content

Hello, 

We need to use document approval for sales quotation approval. This because we have to approve the sales quotation by different users before release. 

Can someone help me with the statement to trigger the release of the sales quotation, when the connected document is released.  

The event trigger is not the problem, but the action to preform the release of the sales quotation. 

A general direction for the statement is needed . 

The document title is the same as the sales quotation number. 

 

Thanks

Have you tried something like this:

declare 
  info_ varchar2(32000):= null;
  objid_ varchar2(32000);
  objversion_ varchar2(32000);
  null_ varchar2(32000):=null;
begin
  
  select q.objid, q.objversion into objid_, objversion_
  from order_quotation q where q.quotation_no=&new:xxxxxx;
  
  ORDER_QUOTATION_API.RELEASE__( info_ , objid_ , objversion_ , null_ , 'DO' );
  
end;


Hi Hans,

I can't get it to work.

See below the event, and event action.

What am i missing?

 

 


try with this:

declare 
  info_ varchar2(32000):= null;
  objid_ varchar2(32000);
  objversion_ varchar2(32000);
  null_ varchar2(32000):=null;
  pragma autonomous_transaction; 
begin
  
  select q.objid, q.objversion into objid_, objversion_
  from order_quotation q where q.quotation_no=doc_title_api.Get_Title('&NEW:DOC_CLASS', '&NEW:DOC_NO');
  
  ORDER_QUOTATION_API.RELEASE__( info_ , objid_ , objversion_ , null_ , 'DO' );

  commit;  

end; 


Hi Hans,

Thanks for pointing us i the right direction, it's working great. 

We only had to set a extra condition on the condition for performing the action to prevent it from triggering on every release. 

 

Again thanks 


Reply