Show configuration on hand

The constraint based configuration is saved in relation to the configuration-number (InventDim.ConfigId), however all you see in the On-Hand form is the number.

If you want to see the full configuration that was entered by the user, you can add a simple button to the On-hand form (InventOnhandItem) and override the clicked() method with the following code:

void clicked()
{
    PCExecuteVariantConfiguration executeVariantConfiguration;
    ProdTable                     tmpProdTable;

    tmpProdTable.InventDimId = InventDim::findOrCreate(inventDim).InventDimId;
    tmpProdTable.ItemId      = InventSum.ItemId;

    if(PCRuntimeLibrary::isConstraintBasedConfigurable(InventSum.ItemId))
    {
        executeVariantConfiguration = PCExecuteVariantConfiguration::execute(tmpProdTable, InventSum.ItemId, inventDim.ConfigId);
    }
}

 

Result:

Open configuration from the on-hand form

Open configuration from the on-hand form

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