Main difference between ‘write to entity’ and ‘write to records'

Certified Senior Developer

Hi all, I am new to the Appian.

I am created an interface with record type, add option and a process model to save the data in database.

Created process model with the options ‘write to entity’ and ‘write to records. Below is my understanding.

  1. Enable activity chaining is refreshing record type data in both the options.
  2. Rule input for interface can be created by using CDT. This will work only for ‘write to entity’.
  3. ‘Write to entity’ and ‘Write to record’ both are same. ‘Write to record’ is the latest one and ‘Write to entity’ is the legacy approach.

 Please confirm is there any other main difference.

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    1) Yes and no. Activity chaining delays the UI refresh up to the end of the chain. It has no direct relationship to "refreshing record type data". And some UI components can be configured to refresh automatically using the refreshAfter parameter.

    2) True

    3) I would say, they are similar. Data store entities are a more direct connection to the database, and Records add another level of abstraction providing a bunch of extremely nice features. I try to shift my work to Records only.

  • One of the biggest differences is just the number of objects used. We created the Write Records node because that enables you to use a record type for all operations - if you use Write to DSE, you must create a CDT, Data Store, and Entity to perform the write.

    There are also a couple of additional benefits to Write Records:

    • You can write records and related records together, which makes it easy to update multiple tables at once
    • You can use Write Records to also write record events, which can help you understand the key milestones in your application
    • Write Records has an option to skip the node if an error occurs (while Write to DSE does not), which gives you more flexibility in writing data
    • Write Records is more efficient at updating data - if certain fields are not included or not changed, Write Records ignores them, making updates faster and less likely to accidentally overwrite data

    Like Stefan said - I generally recommend using Write Records over Write to DSE. It has a lot of benefits over Write to DSE, and we're also continuing to make updates to Write Records in the coming quarters!

  • 0
    Certified Lead Developer
    in reply to sasia0001

    Do not mark your gratitude as "Suggest as Answer".
    If you find any answer helpful, mark it as "helpful".

  • 0
    Certified Senior Developer
    1. Enable Activity Chaining: This option refreshes record data after an activity chain completes, and it works for both "write to entity" and "write to records."

    2. Rule Input for Interface using CDT: You can use Custom Data Types (CDTs) to define input parameters for your interface. This applies to both "write to entity" and "write to records."

    3. "Write to Entity" vs. "Write to Records":

      • "Write to Entity" is for saving data directly to a record entity.
      • "Write to Records" is another method for saving data and is considered the newer approach. Both have their use cases, and the choice depends on your specific needs. "Write to Records" is not necessarily a replacement for "Write to Entity" but offers different functionality and flexibility.