Friday, December 3, 2010

PO-Faxstar Integration



Faxstar is a product from the company called Sepe, Inc. It has the ability to send PO Document via email and Fax. I tried to jot down few commands which can be used in After report trigger

DECLARE
f text_io.file_type;
BEGIN
--Command to open the text file
f := text_io.fopen ('/tmp/'
|| :p_conc_request_id
|| 'e.txt', 'W');

-- Command to display Supplier Name in Console Log
text_io.put_line (f, '**(REF) '
|| v_supplier_name
|| ' **END');

-- Command to send Mail with Subject and Attachment
text_io.put (
f,
|| '**(MAIL) '
|| :p_email_address
|| ' **(SUBJECT)'
|| 'PO-NUMBER:'
|| :P_PO_NUM_FROM
|| ' **(PMATTACH) '
|| :p_conc_request_id
|| 'e.pdf'
|| ' **END'
);

-- Command to send Fax to given Fax Number
text_io.put (
f,
|| '**(FAX) '
|| :p_fax_num
|| ' **(PATTACHPDF) '
|| :p_conc_request_id
|| 'f.pdf'
|| ' **END'
);

-- Email Confirmation in case of fax failure
text_io.put_line (
f,
|| '**(MFAIL) '
|| 'adchintawar@gmail.com'
|| '**(REF)'
|| 'PO-NUM-'
|| :P_PO_NUM_FROM
|| '**END'
);

--Command to Close the text file
text_io.fclose (f);
END;

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.