Tuesday, October 7, 2014

How to Set MEC Outbound File Name Using Code

This article describes how to apply a unique name to the out-bound file that is generated from the MEC.

[Spec Code] + _ [yyyyMMddhhmmss]

First the system date and time has to be generated and assign in to a string variable ( as described in this post ). Then call the below built in method inside a user defined function ( make sure that it's not inside a block which is controlled by a logic). 

setManifestInfo("map:M3_MEC_001", fileName);

then go to Partner Admin -> Manage -> Communication -> Send Tab and select your channel configuration and click on edit.



Now set the File name equally to what you have mentioned inside of setManifestInfo method of your code, but with brackets. Set file extension to " - " (no spaces or quotation marks). Set the value of "Class to make file name unique" to MEC_InfixManifest.

Now trigger your inbound channel and check the output.

No comments :

Post a Comment