Using Javascript (or programatically) how to set the content

Posted by nithinonpsdn on 03-Jun-2010 05:18

I have a Multipart message coming from a step with some Content-Ids given by sonic like 'name', etc... How can i set the content-id for the individual parts of

such a flowing multipart message?

All Replies

Posted by Admin on 03-Jun-2010 09:31

Using the javascript file in a transformation servicetype below you can change the content-id's of the various message parts, see also knowledgebase entry S3175:

function rule(){

  quantityParts = XQMessage.getPartCount();

  // walk through all the message parts

  for (counter = 0; counter

  {

  partobject = XQMessage.getPart(counter);

  partobject.setContentId("myID" + counter); 

   // do not forget to save the changed message-part into the message

   XQMessage.replacePart(partobject,counter);

  }

return null;

}

Posted by nithinonpsdn on 07-Jun-2010 08:38

Thanks a lot Serge!!!

This thread is closed