Genpact Cora Knowledge Center

Support

Send an Attachment to a Web Service Consumer

v7.0

Follow this sample to learn how to send an attachment to a Web service consumer. This sample assumes that you have only one attachment field on the form. If you have more than one attachment field, you need to use the attachment ID rather than the activity instance ID.

  1. In the Web service consumer, set the data source to match the sample.
    {Form1}.Query("tblAttachments").asQueryable().where(fldId = ToGuid({Form1}.Query("DefaultView")["File1Value"])).first().fldContent
  2. Map the Byte field to DS.Item.


v7.1 and later

Follow this sample to learn how to send an attachment to a Web service consumer. This sample assumes that you have only one attachment field on the form. If you have more than one attachment field, you need to use the attachment ID rather than the activity instance ID.

  1. In the Web service consumer, set the Value property of the Byte array variable to match the sample.
    {Form1}.Query("tblAttachments").asQueryable().where(fldId = ToGuid({Form1}.Query("DefaultView")["File1Value"])).first().fldContent
  2. Map the Byte field to DS.Item.