Quantcast
Channel: SCN : Popular Discussions - SAP Business ByDesign
Viewing all articles
Browse latest Browse all 2194

Action to create a text file and download this file.

$
0
0

Hi experts,

 

I need to create a text file in a BO Action.

 

I tried with this code in the script, but I don't can download this file.

 

var doctype: DocumentTypeCode;

var binaryObject: BinaryObject;

var docDesc: Description;

var docName: LANGUAGEINDEPENDENT_Name;

var docAltName: LANGUAGEINDEPENDENT_Name;

var string = "TEST";

 

docName = "test.txt";

doctype.content = "10001";

doctype.listID = "10296";

binaryObject.mimeCode = "text/plain";

binaryObject.content = Binary.ParseFromString(string);

 

this.myAttachments.CreateFile(doctype,docName,docName,docDesc,binaryObject);

 

 

I hope somebody help me.

 

Best regards.


Viewing all articles
Browse latest Browse all 2194

Trending Articles



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