Skip to Content

Unable to get template content based on template Code or group code ID

Hi Folks

I am facing hard time to retrieve the Form Template Content based on Form Template Code or Group Code ID .

I have a requirement in which I have to send an email with PDF Form that is Standard One. I know the Template Code of Standard Form but when I try to read content of form template based on template code or Group code , it does not provide me content.

Below is code that I am using to get the content of template code.


import ABSL; import AP.FO.Activity.Global as prop;

import AP.Common.GDT as GlobalDataTypes;

import BASIS.Global; //for the pdf

import DocumentServices.Global;

import AP.FO.BusinessPartner.Global;

var elEmailRoot : elementsof EmailActivity;

var elEmailParty: elementsof EmailActivity.Party;

var instEmail; var emailBody;

var emailSubject;

var elEmailTxtColl: elementsof EmailActivity.TextCollection;

var elEmailTxtCollTxt: elementsof EmailActivity.TextCollection.Text;

var elEmailTxtCollTxtCntnt: elementsof EmailActivity.TextCollection.Text.TextContent;

var instEmailTxtColl; var instEmailTxtCollTxt;

var instEmailTxtCollTxtCntnt;

var instEmailAttFld;

var attachment = this.AttachmentFolder.Document;

emailSubject = "test_RMA";

elEmailRoot.Name.content = emailSubject;

instEmail = EmailActivity.Create(elEmailRoot)

elEmailParty.PartyKey.PartyID.content = ""; instEmail.MessageToParty.Create(elEmailParty);

instEmailAttFld = instEmail.AttachmentFolder.Create(); v

ar doctype : GlobalDataTypes:DocumentTypeCode;

var binaryObject : BinaryObject;

var docDesc : GlobalDataTypes:Description;

var docName : GlobalDataTypes:LANGUAGEINDEPENDENT_Name;

var docAltName : GlobalDataTypes:LANGUAGEINDEPENDENT_Name;

var bin : BinaryObject.content; var FormTemplateLanguage = "E";

var PDF : BinaryObject;

var FormTemplateCode : OutputRequestFormTemplateCode;



FormTemplateCode.content = "C3101"; // ZEEA3 custom attachment code docName = "test2.pdf";

doctype.content = "10001";

var PDFDocument = OutputManagementUtilities.GetPDF(this,FormTemplateCode,FormTemplateLanguage);

var description : Description;

var documentName : LANGUAGEINDEPENDENT_Name;

var documentAlternativeName : LANGUAGEINDEPENDENT_Name;

var DocDesc : Description;

var DocBInary : BinaryObject.content;

binaryObject.content = col.FileContent.BinaryObject.content;

binaryObject.mimeCode = "application/pdf";

instEmailAttFld.CreateFile(doctype, docName, docAltName, docDesc, binaryObject); instEmail.Send();


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 08, 2017 at 07:37 PM

    Hi Guys,

    issue has been resolved.

    Add comment
    10|10000 characters needed characters exceeded