Create Record in Entity from action

Create Record in Entity from action

I would like to iterate through a list based on one entity and test for a condition. If this codition is met, then I would like to create a new entity in another table. I thought I may be able to just use the CreateAlert action of the Alert entity, but this obviously requires a sourceId that I do not have available within my current action.

I am sure there must be a way to do this.

Any help would be appreciated.
Hi Colin,

Can you explain a bit more on what entities you have and what are you iterating?

Assuming a bit from what you said: if you are iterating over the "Source" entity then you can use the Id from it to fill your Alert record.

If what I said doesn't make sense at all, please post a screenshot of what you trying to do ;)

João Rosado
Hi Colin,

you can declare a local variable in your action, and then fill it up with an assign.

Just right click on the action and you will see the "add local variable" in the menu. Then you define the data type as "Record" and the "Record Definition" as "Alert".

Hope it helps!
The simplest example I can give is the following:

You have 2 entities.  1 is for 'Customers' and the other is for 'Alerts'.

I want to iterate over the 'Customers' entity validating business rules and when there are exceptions, I want to write those exceptions to the 'Alerts' entity, so that the alerts can be displayed elsewhere
Hi Colin,

I also recomend watch the videos in Academy