Embedding Images dynamically

The awisto OfficeIntegration makes it possible for you to embed images from your CRM-System into your documents. To do this you can either provide the URL of the image or the image itself, which will be interpreted as an Base64-Encoded data stream, to the XML-Readout. It is also necessary to add a picture content control to the template.

EmbedImageToTemplateSample Embeded image sample


Data Source

The LinkedFetchXMLDataSet of the product image will load for each order item separately. The example below presumes that there is only one saved image for each order item. In addition, the images need to either be png- or jpeg-format.

<i18n:LinkedFetchXmlDataSet ItemName="Produktbild" FromAttribute="salesorderdetailid" MultipleItems="false">
     <i18n:FetchXml>
        <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
           <entity name=" salesorderdetail">
               <filter type="and">
                  <condition attribute=" salesorderdetailid" operator="eq" value="@parentid" />
               </filter>
               <link-entity name="product" from="productid" to="productid" alias="af">
                  <link-entity name="productsalesliterature" from="productid" to="productid" visible="false" intersect="true">
                     <link-entity name="salesliterature" from="salesliteratureid" to="salesliteratureid" alias="ag">
                        <link-entity name="salesliteratureitem" from="salesliteratureid" to="salesliteratureid" alias="ah">
                          <attribute name="filename" />
                          <attribute name="documentbody" />
                          <filter type="or">
                            <condition attribute="mimetype" operator="like" value="%png" />
                            <condition attribute="mimetype" operator="like" value="%jpeg" />
                          </filter>
                        </link-entity>
                     </link-entity>
                  </link-entity>
               </link-entity>
           </entity>
        </fetch>
     </i18n:FetchXml>
</i18n:LinkedFetchXmlDataSet>