User Tools

Site Tools


share_only_updated_fields

Share only updated fields

Carbon


This dynamic share option shares out only the fields of a record that have been changed, instead of re-sending the entire record when there is an update.

The “Share only updated fields” option will be hidden if the "Share only selected fields" option is selected on the dynamic share configuration and vice-versa.

Configuration

1) To activate this option, checkmark the “Share only updated fields” option.

2) When this box is checked, two additional options are shown on screen:

  • Share system fields - Checking “Share system fields” will always include the system fields sys_created_by, sys_created_on, sys_mod_count, sys_updated_by, and sys_updated_on in the record update message sent regardless of what fields were updated.
  • Select ID field - Checking “Select ID field” allows users to specify an ID field that will always be sent with the record update message. This always defaults to sys_id, but can be changed to any field.

After configuring this feature and saving the dynamic share, records will then be shared out with only the fields modified. For example if the short_description, active, state, and number fields are updated on an existing record in the ticket table, the XML sent out for a record would be as follows:

<?xml version="1.0" encoding="UTF-8"?>
<ticket>
    <short_description>test</short_description>
    <active>1</active>
    <state>1</state>
    <number>TKT0010002</number>
    <sys_id>a05859f80f0d0600276f6d28b1050ea4</sys_id>
</ticket>

If the “Select ID field” option was set to something other than sys_id (like correlation_id) in the above example, then sys_id would not be included in the message sent out and correlation_id would be included regardless of whether correlation_id was changed or not, like below:

<?xml version="1.0" encoding="UTF-8"?>
<ticket>
    <short_description>test</short_description>
    <correlation_id>SW134513</correlation_id>
    <active>1</active>
    <state>1</state>
    <number>TKT0010002</number>
</ticket>

Display values are supported and will still create <dv> fields in the XML with this option selected. For example:

<?xml version="1.0" encoding="UTF-8"?>
<ticket>
    <state>1</state>
    <dv_state>Open</dv_state>
    <number>TKT0010001</number>
    <sys_id>a05859f80f0d0600276f6d28b1050ea4</sys_id>
</ticket>
share_only_updated_fields.txt · Last modified: 2018/03/13 13:03 by paul