Hello Dynamics Community,
I have added a field “RetailVariantId” to the data entity “SalesOrderLineV2 Entity” and also included the same field in the staging table “SalesOrderLineV2Staging”. This setup works fine when I import data from an Excel file by filling in all these fields: RetailVariantId, ProductColorId, ProductSizeId, ProductStyleId, ProductConfigurationId, and ProductVersionId.
Current Requirement:
Now, I need to auto-populate the dependent fields (ProductColorId, ProductSizeId, ProductStyleId, ProductConfigurationId, and ProductVersionId) from RetailVariantId when I only provide RetailVariantId in the Excel file and import data through that file. Currently, it gives an error stating that all these fields are required.
Reference from Existing Functionality:
I was shown a reference of another data entity named “PurchPurchaseOrderLineV2Entity”. In this entity, the field “RetailProductVariantNumber” is included by default. When we import data into this entity through an Excel file without adding the dependent fields (ProductColorId, ProductSizeId, ProductStyleId, ProductConfigurationId, and ProductVersionId) and only provide the value for “RetailProductVariantNumber”, it successfully imports the data and auto-populates the dependent fields.
Has anyone faced a similar issue or can provide guidance on how to achieve this auto-population of dependent fields in “SalesOrderLineV2 Entity”?
Thank you in advance for your help!