Genpact Cora Knowledge Center

Support

Send an Attachment to a Web Service Consumer

V9.2 and later

To send an attachment to a Web service consumer, follow the steps below:

  1. In the Web service consumer, set the Value property of the Byte array variable to match the below sample.
    {Form1}.Query("Form1").Include("Field2").Field2.Content
  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 in 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.

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.