Solved

Automate Purchase Order PDF Email

  • 11 December 2019
  • 17 replies
  • 4967 views

Userlevel 5
Badge +11
  • Hero (Customer)
  • 113 replies

Hi all,

In IFS10 UPD4 I have developed an automated process to take an authorised Purchase Requisition, convert it to a Purchase Order, release it and then email the requisitioner with the order details. I would like to attach a PDF copy of the PO (or send one from another Event Action) but have not managed to figure out how to do it.

I have an Event configured against the PURCHASE_ORDER_TAB table that triggers when the PO is Released and then an Event Action E-mail to inform the requisitioner, but there are no Event linked attachments available to attach.

Does anyone know how to code the printing and emailing functionality?

Thanks in advance,

Ged Pierce.

icon

Best answer by GPIE 15 January 2020, 09:28

View original

17 replies

Userlevel 6
Badge +18

I’d also be interested to know how an event action might be built to auto-print a specific report.  We’re looking for other purposes but it ties in with the first part of @GPIE ‘s question.

Nick

Userlevel 5
Badge +7

For emailing, you can setup an event action based on the creation of the PDF object. Your IFS Apps 10 system should have an application defined event named “PDF_REPORT_CREATED” in the “PrintJob” Logical Unit. You can add an event action to it to email the report.

 

For auto-printing, you could create an event action that would use a small amount of PL/SQL to create a print job. You would need to make some decisions on what printer to send the output to based on user, location, etc.

 

Userlevel 6
Badge +18

> you could create an event action that would use a small amount of PL/SQL to create a print job

And that’s exactly the difficulty...what that would look like, what API(s) might be used, etc.  I’m hoping that someone who has done it previously might be able to provide some guidance rather than needing to start from zero.

Any heroes out there? :fingers_crossed_tone1:

Userlevel 6
Badge +14

@NickPorter

search this forum for “attribute string” and “batch print work instruction”. That should give you the info you need. You will end up with something like this. 

procedure printWorkInstruction(order_no_ varchar2, release_no_ varchar2, sequence_no_ varchar2, printer_id_ varchar2)
is
layout_name_ varchar(2000):='ShopOrdWiRep.rdl';
report_id_ varchar2(2000):= 'SHOP_ORD_WI_REP';
report_attr_ varchar2(2000);
parameter_attr_ varchar2(2000);
distribution_list_ varchar2(2000):= '';
instance_attr_ varchar2(2000);
print_job_id_ varchar2(2000);
print_attr_ varchar2(2000):= '';
result_key_ varchar2(2000);
attr_ varchar2(2000);
begin

report_attr_:= 'REPORT_ID'||chr(31)||report_id_||chr(30)||'LAYOUT_NAME'||chr(31)||layout_name_||chr(30);
parameter_attr_:= 'ORDER_NO'||chr(31)||order_no_||chr(30)||'RELEASE_NO'||chr(31)||release_no_||chr(30)||'SEQUENCE_NO'||chr(31)||sequence_no_||chr(30);

archive_api.New_Client_Report(result_key_, report_attr_, parameter_attr_, distribution_list_, print_attr_);
archive_api.Get_Info(instance_attr_,parameter_attr_,result_key_);

attr_:= 'PRINTER_ID'||chr(31)||printer_id_||chr(30);
print_job_api.New(print_job_id_,attr_);

client_sys.Add_To_Attr('PRINT_JOB_ID',print_job_id_,instance_attr_);
client_sys.Add_To_Attr('RESULT_KEY',result_key_,instance_attr_);

print_job_contents_api.New_Instance(instance_attr_);

print_Job_API.Print(print_job_id_);

commit;

end printWorkInstruction;

 

Userlevel 6
Badge +18

@Hans Andersen thanks!  In the words of a wise man... “Flippin’ sweet!”

Very helpful.

Nick

Userlevel 5
Badge +7

Instead of using hard coded escape characters (30 & 31) you might consider using the IFS supplied procedure in the entire block.

 

procedure printWorkInstruction(order_no_ varchar2, release_no_ varchar2, sequence_no_ varchar2, printer_id_ varchar2)
is
layout_name_ varchar(2000):='ShopOrdWiRep.rdl';
report_id_ varchar2(2000):= 'SHOP_ORD_WI_REP';
report_attr_ varchar2(2000) := '';
parameter_attr_ varchar2(2000) := '';
distribution_list_ varchar2(2000):= '';
instance_attr_ varchar2(2000) := '';
print_job_id_ varchar2(2000) := '';
print_attr_ varchar2(2000):= '';
result_key_ varchar2(2000) := '';
attr_ varchar2(2000) := '';
begin
Client_Sys.Clear_Attr(report_attr_);
Client_Sys.Clear_Attr(parameter_attr_);
Client_Sys.Clear_Attr(attr_);

Client_Sys.Set_Item_Value('REPORT_ID', report_id, report_attr_);
Client_Sys.Set_Item_Value('LAYOUT_NAME', layout_name_, report_attr_);

Client_Sys.Set_Item_Value('ORDER_NO', order_no_, parameter_attr_);
Client_Sys.Set_Item_Value('RELEASE_NO', release_no_, parameter_attr_);
Client_Sys.Set_Item_Value('SEQUENCE_NO', sequence_no_, parameter_attr_);

archive_api.New_Client_Report(result_key_, report_attr_, parameter_attr_, distribution_list_, print_attr_);
archive_api.Get_Info(instance_attr_, parameter_attr_, result_key_);

Client_Sys.Set_Item_Value('PRINTER_ID', printer_id_, attr_);
print_job_api.New(print_job_id_,attr_);

client_sys.Set_Item_Value('PRINT_JOB_ID', print_job_id_, instance_attr_);
client_sys.Set_Item_Value('RESULT_KEY', result_key_, instance_attr_);

print_job_contents_api.New_Instance(instance_attr_);

print_Job_API.Print(print_job_id_);

commit;
end printWorkInstruction;

 

 

Userlevel 7
Badge +15

You can do this is two ways. Use an event action or using a report rule.

In both cases, you need to create a print job as described in this discussion. One thing to add here is that as you only want to email the PDF report and not to print it, you can use the NO_PRINTOUT predefined logical printer. As the name says, this will only create the PDF and archive it.

if you plan to use an event action, then you will have to pass values, to the PDF_EVENT_PARAM1 - 10 when creating your print job. These will hold the values to be use in the event action for the mail to, from,  subject and body etc. You need to pass these values in the attr_ when calling the print_job_api.new under SETTINGS attr string.

e.g.

!PDF

$PDF_ARCHIVING=TRUE
$PDF_EVENT_PARAM_1=Chanaka.amarasekara@ifsworld.com
$PDF_EVENT_PARAM_2=CHA
$PDF_EVENT_PARAM_3=CHA
$PDF_EVENT_PARAM_4=CHA-E-Mail
$PDF_EVENT_PARAM_5=Chanaka Amarasekara
$PDF_EVENT_PARAM_6=P740245
$PDF_EVENT_PARAM_8=CHA-E-Mail
$REPLY_TO_USER=CHAALK

 

Then you need to create an event action type of email and use the PDF_EVENT_PARAMS to configure the event action.

When the print job is successfully completed (check from Print Manger) the event is triggered and the email is sent.

 

The other way is that, if you have all the details to be included in the generated XML data. That is the email to be sent, the info that should be included in the title and body etc. Then you can simply create a print job to the NO_PRINTOUT logical printer. Here you don’t have to worry about EVENT_PARAMS so no need to include those. Then simple add a report rule of type send email. Then add the info like to, from, subject and body from the XML data using the xpaths. I think this is the easies way. Also you have the flexibility of sending the mail depending on conditions using the data itself. See the following link for more details.

https://docs.ifs.com/techdocs/Foundation1/040_administration/250_operational_reporting/070_report_rules/default.htm

Hope this helps.

Userlevel 4
Badge +9

I've done the following for documents where we want them to be send automatically:

  • Create an event that prints the document with Event Parameters to ensure I can determine if it must be mailed.
  • Then use ‘Emailing Report using Event Action’ to actually send the email. I prefer this way above the report rule.

I've used existing API to look how IFS handles this in the existing RMB's, then I just changed this code and put in an event. A good example is PURCHASE_ORDER_API.EMAIL__.

Userlevel 5
Badge +11

Thanks everyone for your comments.

I had looked at the PDF event action but there seems to be a bug (currently with IFS support) where the attachment selection of event generated documents is greyed out. However, it didn’t help me generate the PDF in the first place.

I am on holiday today so will review the code samples tomorrow.

Again, thank you all.

Ged.

Userlevel 5
Badge +11

After digging around in the Server Trace tab of Debug Console (after reading this thread) I have a working solution:

First, create the PDF Parameters but including SEND_PDF and SEND_PDF_TO ...

DECLARE
P0_ VARCHAR2(32000) :=
'SEND_PDF'||CHR(31)||'TRUE'||CHR(30)||
'SEND_PDF_TO'||CHR(31)||'user.name@domain.com'||CHR(30)||
'PDF_ARCHIVING'||CHR(31)||'TRUE'||CHR(30)||
'PDF_EVENT_PARAM_1'||CHR(31)||''||CHR(30)||
'PDF_EVENT_PARAM_2'||CHR(31)||VENDOR_NO||CHR(30)||
'PDF_EVENT_PARAM_3'||CHR(31)||CONTRACT||CHR(30)||
'PDF_EVENT_PARAM_4'||CHR(31)||''||CHR(30)||
'PDF_EVENT_PARAM_5'||CHR(31)||'User Name'||CHR(30)||
'PDF_EVENT_PARAM_6'||CHR(31)||ORDER_NO||CHR(30)||
'REPLY_TO_USER'||CHR(31)||'USER_ID'||CHR(30);
P1_ VARCHAR2(32000) := ORDER_NO;
P2_ VARCHAR2(32000) := '';
P3_ VARCHAR2(32000) := '*';
P4_ VARCHAR2(32000) := CONTRACT;
P5_ VARCHAR2(32000) := NULL;
P6_ VARCHAR2(32000) := VENDOR_NO;
BEGIN
IFSAPP.PURCHASE_ORDER_API.GENERATE_PDF_PARAMETERS (P0_ , P1_ , P2_ , P3_ , P4_ , P5_ , P6_ );
END;

Then run the Print Job code, modified (from the code shown in this thread) to include the Purchase Order Report requirements ...

DECLARE
LAYOUT_NAME_ VARCHAR(2000):='PURCHASEORDERPRINTREP.RDL';
REPORT_ID_ VARCHAR2(2000):= 'PURCHASE_ORDER_PRINT_REP';
REPORT_ATTR_ VARCHAR2(2000);
PARAMETER_ATTR_ VARCHAR2(2000);
DISTRIBUTION_LIST_ VARCHAR2(2000):= '';
INSTANCE_ATTR_ VARCHAR2(2000);
PRINT_JOB_ID_ VARCHAR2(2000);
PRINT_ATTR_ VARCHAR2(2000);
PRINTER_ID_ VARCHAR2(2000):= 'PDF_PRINTER';
PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order';
ORDER_NO_ VARCHAR2(2000):= ORDER_NO;
RESULT_KEY_ VARCHAR2(2000);
ATTR_ VARCHAR2(2000);
BEGIN
REPORT_ATTR_:= 'REPORT_ID'||CHR(31)||'PURCHASE_ORDER_PRINT_REP'||CHR(30)||'LAYOUT_NAME'||CHR(31)||'PURCHASEORDERPRINTREP.RDL'||CHR(30);
PARAMETER_ATTR_:= 'ORDER_NO_LIST'||CHR(31)||ORDER_NO_||CHR(30)||'PUR_ORDER_PRINT_OPTION'||CHR(31)||PUR_ORDER_PRINT_OPTION_||CHR(30);
ARCHIVE_API.NEW_CLIENT_REPORT(RESULT_KEY_, REPORT_ATTR_, PARAMETER_ATTR_, DISTRIBUTION_LIST_, PRINT_ATTR_);
ARCHIVE_API.GET_INFO(INSTANCE_ATTR_,PARAMETER_ATTR_,RESULT_KEY_);
ATTR_:= 'PRINTER_ID'||CHR(31)||PRINTER_ID_||CHR(30);
PRINT_JOB_API.NEW(PRINT_JOB_ID_,ATTR_);
CLIENT_SYS.ADD_TO_ATTR('PRINT_JOB_ID',PRINT_JOB_ID_,INSTANCE_ATTR_);
CLIENT_SYS.ADD_TO_ATTR('RESULT_KEY',RESULT_KEY_,INSTANCE_ATTR_);
PRINT_JOB_CONTENTS_API.NEW_INSTANCE(INSTANCE_ATTR_);
PRINT_JOB_API.PRINT(PRINT_JOB_ID_);
END;

This process created the Report Archive, the PDF Archive and emails the PDF to the recipient.

The downside of using this method is not being able to control the text or layout in the email ...

 

Userlevel 5
Badge +11

This code can be run to both generate the PDF parameters and send the PDF in one hit, to either negate the need to create the PDF parameters or to override the existing PDF parameters. Note the expansion of the ATTR_ data.

Now it would be nice to be able to change the email subject and body.

DECLARE
LAYOUT_NAME_ VARCHAR(2000):='PurchaseOrderPrintRep.rdl';
REPORT_ID_ VARCHAR2(2000):= 'PURCHASE_ORDER_PRINT_REP';
REPORT_ATTR_ VARCHAR2(2000):= '';
PARAMETER_ATTR_ VARCHAR2(2000):= '';
DISTRIBUTION_LIST_ VARCHAR2(2000):= '';
INSTANCE_ATTR_ VARCHAR2(2000):= '';
PRINT_JOB_ID_ VARCHAR2(2000):= '';
PRINT_ATTR_ VARCHAR2(2000):= '';
PRINTER_ID_ VARCHAR2(2000):= 'PDF_PRINTER';
PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order';
--PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order Work Copy';
ORDER_NO_ VARCHAR2(2000):= ORDER_NO;
RESULT_KEY_ VARCHAR2(2000):= '';
ATTR_ VARCHAR2(2000):= '';
BEGIN
REPORT_ATTR_:= 'REPORT_ID'||CHR(31)||'PURCHASE_ORDER_PRINT_REP'||CHR(30)||'LAYOUT_NAME'||CHR(31)||'PurchaseOrderPrintRep.rdl'||CHR(30);
PARAMETER_ATTR_:= 'ORDER_NO_LIST'||CHR(31)||ORDER_NO_||CHR(30)||'PUR_ORDER_PRINT_OPTION'||CHR(31)||PUR_ORDER_PRINT_OPTION_||CHR(30);
ARCHIVE_API.NEW_CLIENT_REPORT(RESULT_KEY_, REPORT_ATTR_, PARAMETER_ATTR_, DISTRIBUTION_LIST_, PRINT_ATTR_);
ARCHIVE_API.GET_INFO(INSTANCE_ATTR_,PARAMETER_ATTR_,RESULT_KEY_);
ATTR_:= 'PRINTER_ID'||CHR(31)||PRINTER_ID_||CHR(30)
||'SETTINGS'||CHR(31)||'!FNDINF.SEND_PDF
$SEND_PDF=TRUE
$SEND_PDF_TO=gerrard.pierce@unipart.com
$APPLY_DEFAULTS=FALSE
!PDF
$PDF_ARCHIVING=TRUE
$PDF_EVENT_PARAM_1=
$PDF_EVENT_PARAM_2='||myline.vendor_no||'
$PDF_EVENT_PARAM_3='||myline.contract||'
$PDF_EVENT_PARAM_4=
$PDF_EVENT_PARAM_5=IFS APPLICATIONS
$PDF_EVENT_PARAM_6='||myline.order_no||'
$REPLY_TO_USER=IFSAPP'||CHR(30);
PRINT_JOB_API.NEW(PRINT_JOB_ID_,ATTR_);
CLIENT_SYS.ADD_TO_ATTR('PRINT_JOB_ID',PRINT_JOB_ID_,INSTANCE_ATTR_);
CLIENT_SYS.ADD_TO_ATTR('RESULT_KEY',RESULT_KEY_,INSTANCE_ATTR_);
PRINT_JOB_CONTENTS_API.NEW_INSTANCE(INSTANCE_ATTR_);
PRINT_JOB_API.PRINT(PRINT_JOB_ID_);
END;

 

Userlevel 3
Badge +8

Hi another dimension in this topic,  attach Document management documents to outgoing PDF reports. The main purpose is to attach document(s) to Purchase  Order and Customer Order  for detail tech documents and / or general terms and condition.

 

This has already been implemented as customization at some customers, but it would be very helpful if it is included into Core.

 

 

Userlevel 4
Badge +9

After digging around in the Server Trace tab of Debug Console (after reading this thread) I have a working solution:

First, create the PDF Parameters but including SEND_PDF and SEND_PDF_TO ...

DECLARE
P0_ VARCHAR2(32000) :=
'SEND_PDF'||CHR(31)||'TRUE'||CHR(30)||
'SEND_PDF_TO'||CHR(31)||'user.name@domain.com'||CHR(30)||
'PDF_ARCHIVING'||CHR(31)||'TRUE'||CHR(30)||
'PDF_EVENT_PARAM_1'||CHR(31)||''||CHR(30)||
'PDF_EVENT_PARAM_2'||CHR(31)||VENDOR_NO||CHR(30)||
'PDF_EVENT_PARAM_3'||CHR(31)||CONTRACT||CHR(30)||
'PDF_EVENT_PARAM_4'||CHR(31)||''||CHR(30)||
'PDF_EVENT_PARAM_5'||CHR(31)||'User Name'||CHR(30)||
'PDF_EVENT_PARAM_6'||CHR(31)||ORDER_NO||CHR(30)||
'REPLY_TO_USER'||CHR(31)||'USER_ID'||CHR(30);
P1_ VARCHAR2(32000) := ORDER_NO;
P2_ VARCHAR2(32000) := '';
P3_ VARCHAR2(32000) := '*';
P4_ VARCHAR2(32000) := CONTRACT;
P5_ VARCHAR2(32000) := NULL;
P6_ VARCHAR2(32000) := VENDOR_NO;
BEGIN
IFSAPP.PURCHASE_ORDER_API.GENERATE_PDF_PARAMETERS (P0_ , P1_ , P2_ , P3_ , P4_ , P5_ , P6_ );
END;

Then run the Print Job code, modified (from the code shown in this thread) to include the Purchase Order Report requirements ...

DECLARE
LAYOUT_NAME_ VARCHAR(2000):='PURCHASEORDERPRINTREP.RDL';
REPORT_ID_ VARCHAR2(2000):= 'PURCHASE_ORDER_PRINT_REP';
REPORT_ATTR_ VARCHAR2(2000);
PARAMETER_ATTR_ VARCHAR2(2000);
DISTRIBUTION_LIST_ VARCHAR2(2000):= '';
INSTANCE_ATTR_ VARCHAR2(2000);
PRINT_JOB_ID_ VARCHAR2(2000);
PRINT_ATTR_ VARCHAR2(2000);
PRINTER_ID_ VARCHAR2(2000):= 'PDF_PRINTER';
PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order';
ORDER_NO_ VARCHAR2(2000):= ORDER_NO;
RESULT_KEY_ VARCHAR2(2000);
ATTR_ VARCHAR2(2000);
BEGIN
REPORT_ATTR_:= 'REPORT_ID'||CHR(31)||'PURCHASE_ORDER_PRINT_REP'||CHR(30)||'LAYOUT_NAME'||CHR(31)||'PURCHASEORDERPRINTREP.RDL'||CHR(30);
PARAMETER_ATTR_:= 'ORDER_NO_LIST'||CHR(31)||ORDER_NO_||CHR(30)||'PUR_ORDER_PRINT_OPTION'||CHR(31)||PUR_ORDER_PRINT_OPTION_||CHR(30);
ARCHIVE_API.NEW_CLIENT_REPORT(RESULT_KEY_, REPORT_ATTR_, PARAMETER_ATTR_, DISTRIBUTION_LIST_, PRINT_ATTR_);
ARCHIVE_API.GET_INFO(INSTANCE_ATTR_,PARAMETER_ATTR_,RESULT_KEY_);
ATTR_:= 'PRINTER_ID'||CHR(31)||PRINTER_ID_||CHR(30);
PRINT_JOB_API.NEW(PRINT_JOB_ID_,ATTR_);
CLIENT_SYS.ADD_TO_ATTR('PRINT_JOB_ID',PRINT_JOB_ID_,INSTANCE_ATTR_);
CLIENT_SYS.ADD_TO_ATTR('RESULT_KEY',RESULT_KEY_,INSTANCE_ATTR_);
PRINT_JOB_CONTENTS_API.NEW_INSTANCE(INSTANCE_ATTR_);
PRINT_JOB_API.PRINT(PRINT_JOB_ID_);
END;

This process created the Report Archive, the PDF Archive and emails the PDF to the recipient.

The downside of using this method is not being able to control the text or layout in the email ...

 

Hi will this work with a Crystal report rather than a report designer layout? 
 

thanks 

Badge +2

This code can be run to both generate the PDF parameters and send the PDF in one hit, to either negate the need to create the PDF parameters or to override the existing PDF parameters. Note the expansion of the ATTR_ data.

Now it would be nice to be able to change the email subject and body.

DECLARE
LAYOUT_NAME_ VARCHAR(2000):='PurchaseOrderPrintRep.rdl';
REPORT_ID_ VARCHAR2(2000):= 'PURCHASE_ORDER_PRINT_REP';
REPORT_ATTR_ VARCHAR2(2000):= '';
PARAMETER_ATTR_ VARCHAR2(2000):= '';
DISTRIBUTION_LIST_ VARCHAR2(2000):= '';
INSTANCE_ATTR_ VARCHAR2(2000):= '';
PRINT_JOB_ID_ VARCHAR2(2000):= '';
PRINT_ATTR_ VARCHAR2(2000):= '';
PRINTER_ID_ VARCHAR2(2000):= 'PDF_PRINTER';
PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order';
--PUR_ORDER_PRINT_OPTION_ VARCHAR(2000) := 'Order Work Copy';
ORDER_NO_ VARCHAR2(2000):= ORDER_NO;
RESULT_KEY_ VARCHAR2(2000):= '';
ATTR_ VARCHAR2(2000):= '';
BEGIN
REPORT_ATTR_:= 'REPORT_ID'||CHR(31)||'PURCHASE_ORDER_PRINT_REP'||CHR(30)||'LAYOUT_NAME'||CHR(31)||'PurchaseOrderPrintRep.rdl'||CHR(30);
PARAMETER_ATTR_:= 'ORDER_NO_LIST'||CHR(31)||ORDER_NO_||CHR(30)||'PUR_ORDER_PRINT_OPTION'||CHR(31)||PUR_ORDER_PRINT_OPTION_||CHR(30);
ARCHIVE_API.NEW_CLIENT_REPORT(RESULT_KEY_, REPORT_ATTR_, PARAMETER_ATTR_, DISTRIBUTION_LIST_, PRINT_ATTR_);
ARCHIVE_API.GET_INFO(INSTANCE_ATTR_,PARAMETER_ATTR_,RESULT_KEY_);
ATTR_:= 'PRINTER_ID'||CHR(31)||PRINTER_ID_||CHR(30)
||'SETTINGS'||CHR(31)||'!FNDINF.SEND_PDF
$SEND_PDF=TRUE
$SEND_PDF_TO=gerrard.pierce@unipart.com
$APPLY_DEFAULTS=FALSE
!PDF
$PDF_ARCHIVING=TRUE
$PDF_EVENT_PARAM_1=
$PDF_EVENT_PARAM_2='||myline.vendor_no||'
$PDF_EVENT_PARAM_3='||myline.contract||'
$PDF_EVENT_PARAM_4=
$PDF_EVENT_PARAM_5=IFS APPLICATIONS
$PDF_EVENT_PARAM_6='||myline.order_no||'
$REPLY_TO_USER=IFSAPP'||CHR(30);
PRINT_JOB_API.NEW(PRINT_JOB_ID_,ATTR_);
CLIENT_SYS.ADD_TO_ATTR('PRINT_JOB_ID',PRINT_JOB_ID_,INSTANCE_ATTR_);
CLIENT_SYS.ADD_TO_ATTR('RESULT_KEY',RESULT_KEY_,INSTANCE_ATTR_);
PRINT_JOB_CONTENTS_API.NEW_INSTANCE(INSTANCE_ATTR_);
PRINT_JOB_API.PRINT(PRINT_JOB_ID_);
END;

 

Hi,

I use above  code in IFS 10 Update 8,  and called it from custom menu (Request for order quotation form, supplier tab  with following parameters:   LAYOUT_NAME_  = ‘QuotationRep.rdl’
and   ‘REPORT_ID_  QUOTATION_REP’ 

It’s successfully worked and Print Job created in Print Queue.
But it's status always is waiting and doesn't change.

Userlevel 5
Badge +10

Hi @ChanakaAmarasekara ,

Can we provide the name of the pdf that will be generated through event actions?

 

I am looking to do is rename the PDF attachment on the email from IFS internal numbering to an invoice number or order number.

This is possible using report rules. If this is impossible in event actions, can we link the event action with the report rule?

Userlevel 7
Badge +15

Hi,

The event should take the file name you pass as the attachment name (&PDF_NAME in the event), if you send the value of the file name that you require in the ‘PDF_FILE_NAME’ attribute parameter add to the attribute string along with the other event parameters such as PDF_EVENT_PARAM_* in your code.

Regards,

Chanaka

Userlevel 2
Badge +7

Hi,

Many thanks for the above instructions.

We have successfully implemented the print purchase order event on Purchase Order Release.

However, we also have a PDF_REPORT_CREATED event that is responsible in sending the mail once the purchase order has been printed.

Individually these events work.

  • Release PO will trigger the event to Print.
  • RMD Print PO will trigger the event to email.

But not in a fully automated sequence. Any idea as to why?

Thanks

Dominik

Reply