- ACreate a new entity and copy all the properties from VendorInvoiceLineEntity.
- BExtend VendorInvoiceLineEntity.
- COverlayer your changes on the existing VendorInvoiceLineEntity.
- DEdit VendorInvoiceLineEntity directly.
Justification:
We can Modify existing fields in a table through extension
Modify existing fields in a table through extension
Yes possible.
Add indexes to tables through extension
Yes Possible
Modify table properties through extension
Yes possible
Learn more: Add methods to tables through extension
Yes Possible
Learn More: Change the captions of forms through extension
B. Correct: Build and compile times are reduced with extensions because you don’t have to compile the model that is being extended.
Related Topic: Explore extensions and the extension framework in finance and operations apps
Creating an index in the same manner as you would add an index to a new table is the correct approach. Creating a unique index using the extension is not allowed because it is intrusive. Adding the index to the base table is incorrect because the new field was added to the extension, not the base table. Using a third-party tool is not recommended because it may not be compatible with Microsoft Dynamics 365.
Defining Classes - Visual Basic | Microsoft Learn
Add a table extension to a project - Training | Microsoft Learn
Wrong:
Create a batch job that periodically adjusts inventory levels based on purchase orders.
Wrong:
Modify the base inventory class directly to include the new adjustment logic.
Wrong:
Use an event handler on the purchase order form to adjust inventory when a new order is placed.
Creating a new class or extending an existing class are both appropriate ways to add functionality without impacting the performance of the system. Modifying the base class directly is not recommended as it can lead to issues during updates and maintenance. Creating a batch job would not be real-time and could lead to performance issues if not managed correctly. Using an event handler on the purchase order form does not encapsulate the logic in a class, which was the requirement.
Extension points for frameworks - Training | Microsoft Learn