Top
Top
LibraryEASYProcess Reference ManualProcessesServicesEntityWorkshopCreate

Create Overview

Create is used to create new entity objects. Create works similar to a sql insert into statement. The create service will create an entity object with properties and an entity type and it will also insert a record into sql for the table that is synced with the entity type.

The Entity Create service is useful because it will auto generate the EntityId without needing to generate it. If you chose to do the insert with a SQL query, you would need to first call a GetNextNumber to generate the Entity Id to have the value in order to pass it in and insert the string.


Create Use Example
Workshop:EntityWorkshop
Service:Create
Inputs
EntityId

EntityType

Properties

Property

Name

Value

AutoLoad

Outputs
Entity/EntityId
Entity/EntityIds
Entity/EntityType
Entity/Properties/PropertyName

Create Use Examples

Basic Create Use

In this example we are looking at Message Center. In the message center you can add a new message and add an attachment to the message.

The upload button has a button process that creates an entity object record with an entity type of MessageCenterAttachments. When the button is selected, we are saving an attachment to a specified directory. If the attachment was uploaded to the directory successfully, the Create service runs and creates the new entity object record for MessageCenterAttachments entity type.

The MessageCenterAttachments entity type has properties of MessageId, Filename, and description. These properties are being populated when the create service runs. The create service is also inserting a record into the MessageCenterAttachments sql table that is synced with the MessageCenterAttachments entity type.

The Property Names correspond to columns that exist in the table tied to the entity. The property name must already exist as a column for the table/property for the entity. This is case sensitive. This means that if you make a database change to add a column, but do not sync the EASYProcess entity, the property will not exist yet and the record will be created without a value for the newly added column.

           

Notice that the output lists all properties, not just the ones passed in. It also auto assigned an AttachmentId.


Powered by EASYProcess (© 2019 K-Rise Systems, Inc).