Get ProductMaster based on Product varients

HI, Below is the sample code used to get Product number based on product variants.

Since while trying to get product number directly we will get like “140 :: varient”, we wont be able to get product “140” and further difficult fetch data based on product.

 

ecoResProduct = EcoResProduct::find(this.Product);
ecoResDistinctProductVariant = EcoResDistinctProductVariant::find(this.Product);

EcoResProductMaster::find(ecoResDistinctProductVariant.ProductMaster).DisplayProductNumber

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s