Data Entity Refresh (Including Composite Entity) After Customizations - arp6333/xplusplus GitHub Wiki
- Both the entity extension and an extension of the staging table must be added to the project
-
Any fields added to the entity must be manually added to the staging table, it cannot be auto generated like with a custom new entity
-
Perform a DB sync and build once both entity and staging table are updated
-
You can select in SQL to verify if the fields have been added to the staging table successfully (not to verify data yet, just that the fields were added correctly)
![image](https://user-images.githubusercontent.com/37150799/199101320-c17f2b31-382d-467f-8029-2e992365fa62.png)
- Navigate to 'System Administration -> Data management'
![image](https://user-images.githubusercontent.com/37150799/199094816-cfefadd0-5a6c-40c2-8777-8d55bf985907.png)
- Open 'Framework parameters'
![image](https://user-images.githubusercontent.com/37150799/199096283-d801dea9-4223-4489-b717-c8402bca6dd4.png)
- Click 'Entity settings -> Refresh entity list'
![image](https://user-images.githubusercontent.com/37150799/199096442-46281a17-3a16-46e4-8324-63efa23ed0e9.png)
Note: if you make any code changes to an entity's code (not just the design), you MUST refresh the entity list to see the changes every time.
- This will run in batch, you can see the progress in the Batch jobs list ('System administration -> Inquiries -> Batch jobs')
![image](https://user-images.githubusercontent.com/37150799/199097013-763f61b5-6dab-429c-b14d-77f2642e8f5e.png)
![image](https://user-images.githubusercontent.com/37150799/199096951-b88a7bb7-0d5d-4578-8265-fb4ca156ac92.png)
- Once that completes execution, return back to 'System Administration -> Data management' and click 'Data entities'
![image](https://user-images.githubusercontent.com/37150799/199096136-e1f3938d-4aed-4c20-a4ed-ed53556e7946.png)
- Search for your target entity
If this is a composite entity, search for the parent entity, NOT the child entity that was modified
ex. CustomerPaymentJournalLineEntity has parent CustomerPaymentJournalEntity, so we want to use CustomerPaymentJournalEntity and not CustomerPaymentJournalLineEntity
![image](https://user-images.githubusercontent.com/37150799/199097787-8e93e51d-b9e5-478f-9865-89d9febd972b.png)
i. Then select 'Child entities' from the top bar
![image](https://user-images.githubusercontent.com/37150799/199098380-8e1da85a-d95c-4e2c-aecb-d38770bfd32e.png)
ii. It can be a little buggy and not populate on first click, if so go back and click 'Child entities' again until it populates
![image](https://user-images.githubusercontent.com/37150799/199098503-686eb99d-e6df-47d6-9dd3-ddd18347b4d4.png)
iii. Select the first child entity, even if it was not the one that was modified and continue with the rest of the steps
- Click 'Modify target mapping' from the top bar
![image](https://user-images.githubusercontent.com/37150799/199098854-8291fffb-25b7-4672-8d0f-216be51efec4.png)
- Click the 'Generate mapping' button, and if it prompts 'Do you want to generate the mapping from scratch?' click 'Yes'
![image](https://user-images.githubusercontent.com/37150799/199099228-f3439a84-cb7e-42c7-9325-54608829296f.png)
- Switch to the 'Mapping visualization' tab and verify any new fields are both there, and have a line connecting them from Staging to Target
![image](https://user-images.githubusercontent.com/37150799/199099456-fe5bae81-b018-4d7d-863f-242fcdc8f196.png)
- Click the 'x' to close that form and return to the 'Target entities' form. Click 'Validate' to verify the entity is valid with an inline message
![image](https://user-images.githubusercontent.com/37150799/199099968-6587f67c-7f51-41b4-b629-14a686cec863.png)
You can also click 'Target fields' to verify any new fields have successfully been added, as they will show up on this grid if successful
![image](https://user-images.githubusercontent.com/37150799/199100241-a5bd136e-46b1-4524-891c-22f785bdca4d.png)
![image](https://user-images.githubusercontent.com/37150799/199100556-df4c94f8-1c46-4532-a1d2-63071a5c388b.png)
If composite entity, repeat steps 11-14 for all child entities
- For any jobs that use this entity, the entity can be removed and readded to the job to refresh the field list
![image](https://user-images.githubusercontent.com/37150799/199102612-0f92248d-27d4-43e5-9956-47292e2524f9.png)
![image](https://user-images.githubusercontent.com/37150799/199102697-6427254f-dc97-4ddf-a82c-459329ae6035.png)
You can use '/data' or '/data/' in the URL to view the data in the entity quickly from the front-end. The entity name IS case sensitive!
After the Data Entity name in the url address place a ? then you can start adding the parameters the & will let you add multiple parameters.
Example: (don't worry about spacing and non-URL characters as they will be fixed once you hit enter) /data/SalesInvoiceLines?cross-company=true&$filter=InvoiceId eq 'INV000000001'
Some query options:
- $filter
- $count
- $orderby
- $skip
- $top
- $select
Filter options: $filter:
- Equals (eq)
- Not equals (ne)
- Greater than (gt)
- Greater than or equal (ge)
- Less than (lt)
- Less than or equal (le)
- And
- Or
- Not
https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/odata