on 2016 Jun 15 10:03 AM
Dear Experts, There are three functions in Library OutputManagementUtilities. 1. CreatePrintQueueItem ; 2. CreatePrintQueueItemWithFormTemplate ; 3. GetPDF
First question: There is not explanation for function 1 and 2 in help document, could you help please?
Second question is: Function GetPDF returns nothing when the FormTemplateCode is a standard form template code, while it returns the Binary Data while a Custom Form Template which is created basing on a Custom Business Object is imported. Is this function designed only using for Custom Form Template? Or I missed something while calling this function? >>For example, refer the following codes, templatecode1 is from a Custom Form Template, while templatecode2 is from a standard one(Production Order). Here I am sure the import parameters are correct, for PDF1, I can get the return Binary data as I expected, however, for PDF2,the return is null. I tried several standard form template codes here, the return is always null. >>>>sample codes: FormTemplateCode1.content = "Y8C18KNX_PQB87"; FormTemplateCode2.content = "MM_02"; //Reuse service Call PDF1 = OutputManagementUtilities.GetPDF(this, FormTemplateCode1, FormTemplateLanguage); PDF2 = OutputManagementUtilities.GetPDF(prodOrder, FormTemplateCode2, FormTemplateLanguage); <<<<
Third question is : Function CreatePrintQueueItemWithFormTemplate returns an error message” Mandatory parameter binary data is missing”, there are 12 import parameters of this function, I tried to fill value for all the import parameters as following codes, however the return cannot be get and the error was popped out. Could you help to explain how to use this function please? >>>>sample codes: userAccountID.content="K8U08M26CI1";// documentName="Picking list "+this.MergedPickingListNo; queueId="DEFAULT"; numberOfCopies=1; formTemplateCode="Y8C18KNX_PQB87"; language="1"; countryCode="CN"; companyId="SR10"; OrgUnit="SR11"; channelType="1"; docCreationTimestamp=Context.GetCurrentSystemDateTime().content.ToString(); formXMLData.content=PDF1.content; formXMLData.mimeCode="application/pdf"; formXMLData.fileName="领料单_"+this.MergedPickingListNo+ " .pdf"; formXMLData.uri="/BOAttachments/"+this.MergedPickingListNo+"/"+formXMLData.fileName; formXMLData.characterSetCode="utf-8"; formXMLData.format="pdf"; test=OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(userAccountID,documentName,queueId,numberOfCopies,formXMLData,formTemplateCode,language,countryCode,companyId,OrgUnit,channelType,docCreationTimestamp);<<<
Thanks for your help. Br Misher
Request clarification before answering.
Hell All, Update my findings: The function GetPDF only works for custom Form template "OutputManagementUtilities.GetPDF(this, FormTemplateCode1, FormTemplateLanguage)" For function CreatePrintQueueItem, I can create the print queue item successfully using following sample codes. However for function CreatePrintQueueItemWithFormTemplate , the error “ Mandatory parameter binary data is missing” was popped out. Why same Binary Data behave different in these two functions? What else should be paid attention when calling function-CreatePrintQueueItemWithFormTemplate . Sample codes: userAccountID.content="K8U08M26CI1";// documentName="Picking list "+this.MergedPickingListNo; queueId="DEFAULT"; numberOfCopies=1; formTemplateCode="Y8C18KNX_PQB87"; language="1"; countryCode="CN"; companyId="SR10"; OrgUnit="SR11"; channelType="1"; docCreationTimestamp=Context.GetCurrentSystemDateTime().content.ToString(); formXMLData.content=PDF1.content; formXMLData.mimeCode="application/pdf"; formXMLData.fileName="领料单_"+this.MergedPickingListNo+ " .pdf"; formXMLData.uri="/BOAttachments/"+this.MergedPickingListNo+"/"+formXMLData.fileName; formXMLData.characterSetCode="utf-8"; formXMLData.format="pdf"; //failed created test=OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(userAccountID,documentName,queueId,numberOfCopies,formXMLData,formTemplateCode,language,countryCode,companyId,OrgUnit,channelType,docCreationTimestamp); //Sucessfully created test1=OutputManagementUtilities.CreatePrintQueueItem(userAccountID,documentName,numberOfCopies,formXMLData,queueId); Do you have any idea? thanks br Misher
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
22 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.