RE: duplicate an existing entity to create as a new record for another entity
Yes, you can clone the fields of Entity A and its subgrid values to a new Entity in Dynamics 365. Here's one way to accomplish this:
1. Create a new record in the target entity (let's call it Entity B).
2. Use Power Automate (formerly known as Microsoft Flow) to copy the values of the fields from Entity A to Entity B. You can use the "Create a new record" action in Power Automate to create a new record in Entity B and set the values of its fields based on the values in Entity A.
3. To copy the subgrid values, you can use the "List Records" action in Power Automate to retrieve the records from the subgrid of Entity A. Then, use a loop to iterate through the records and create new records in the subgrid of Entity B. For each record, set the values of its fields based on the values in the corresponding record from the subgrid of Entity A.
4. Once you have created the new record in Entity B and copied over its fields and subgrid values, save the record.
This approach allows you to clone the fields of Entity A and its subgrid values to a new Entity B, and create a new record in Entity B that contains all the cloned values. Note that this approach assumes that the target entity (Entity B) has the same fields and subgrid as the source entity (Entity A). If the target entity has a different set of fields or subgrid, you will need to adjust the Power Automate flow accordingly.