DocumentData can be used to integrate to SBSYS.
When a document is generated from SBSYS, an identically named .xml-file is generated alongside it containing data from SBSYS such as recipient info, sender info or project reference number.
We are able to reference data in this .xml-file by use of the DocumentData JSON string syntax.
Syntax example
SBSYS generates the following .xml data:
<RecipientList>
<Recipient Name="" RecipientType="None">
<RecipientFieldGroup GroupName="Attention">
<RecipientField>
<FieldKey>Adresse</FieldKey>
<FieldValue>Østergade 36</FieldValue>
</RecipientField>
</RecipientList>In order to reference the <FieldValue> in the DocumentData syntax, the tag would look like this:
{{Sbsys.Attention.Adresse}}
Sbsys refers to the prefix parameter in the module.
Attention refers to the <RecipientFieldGroup GroupName="Attention">
Adresse refers to <FieldKey>Adresse</FieldKey>
CMD
The following command looks for an .xml-file in the same folder as current document with the same name as current document.
<Cmd case="SkabelonDesign.Sbsys:InsertData" prefix="Sbsys"/>The prefix parameter is the first part of the reference tag in the JSON string of the content control.
Example of usage with Templafy DMS event
<event type="TemplafyEvents:dms">
<Cmd case="SkabelonDesign.Sbsys:InsertData" prefix="Sbsys"/>
<Cmd case="BaseExtensions:remove-doc-prop" name="TemplafyExternalSystem"/>
<Cmd case="BaseExtensions:remove-doc-prop" name="TemplafyNavigationPath"/>
<Cmd case="BaseExtensions:remove-doc-prop" name="TemplafyAreasToUpdate"/>
</event>To read more about DMS events, click here.
Requirements
Get the SkabelonDesign.DocumentData and SkabelonDesign.Sbsys plugins from:
SD.Installers\Z_AlloyPlugins\RawPlugins
and place the plugin in
...\OfficeExtensions\Plugins
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article