We have a custom activity entity (a "store audit") with a related entity ("products") that has a 1:N relationship (one activity record to multiple records in the related entity).
The idea is that a salesperson will visit a store to do an audit of the products of ours that the store sells. Since we have a dataset in another SQL database that tells us which products a given store sells... we want to use this data to automatically create records in the related "product" entity once a new "store audit" is created.
How do I do this? Specifically... how do I create records for an entity based off a SQL dataset?
EX: We are doing a store audit at STORE5 and we know they sell: PRODUCT1, PRODUCT3, PRODUCT4. So, when a store audit activity is created, we want to look up in our SQL dataset for STORE5 and pull the products -> then create records in the "products" entity and auto populate some of the fields in each record.
What is the approach to doing this? I understand workflows can kick certain things off, like creating a new record... but it's almost like I actually need to call a stored procedure and then have records created based off the result set of this stored procedure.
*This post is locked for comments