Signing Document Content with a Custom Attribute
The Citeck.Esign.sign method now supports specifying the attribute that contains the content to be signed.
The update is backward-compatible — no changes are required in existing projects.
Signing specific content:
Citeck.Esign.sign([{"recordRef":"emodel/attachment@ee040fb3-7cae-4e58-b7d5-f728d7e9e502","contentAtt":"content"}]);
When specifying particular content, you must pass an object in the following format:
{"recordRef": "record_id_of_signed_node","contentAtt": "content_attribute_of_signed_node"}
where:
recordRef — the recordRef of the document to be signed;
contentAtt — the attribute that contains the content to be signed.
If only a recordRef is passed without specifying contentAtt, or the old format is used, the content attribute is treated as the default content attribute.
The old format is also supported. Example:
Citeck.Esign.sign(["emodel/attachment@ee040fb3-7cae-4e58-b7d5-f728d7e9e502"]);
When passing a list of recordRef values directly, the logic also works correctly — the content attribute is used as the content attribute.
A mixed request is also possible, for example:
Citeck.Esign.sign([
{"recordRef":"emodel/attachment@ee040fb3-7cae-4e58-b7d5-f728d7e9e502","contentAtt":"contentCustom"},
"emodel/document@1234567-7cae-4e58-b7d5-f728d7e22341"
]);
In this case, for the first document the content from the contentCustom attribute will be signed, and for the second — the content from the content attribute (if present).