Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2161

ReuseFunctions in OutputManagementUtilities

$
0
0

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


Viewing all articles
Browse latest Browse all 2161

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>