Error when Firming a Planned Order

When we try to firm a planned production order for any Item, it giving error “Cannot create a record in Inventory Dimensions (InventDim). Dimension NO xxxxxxxx. The record already exists.” then without making any changes its working for the same Item for the second time.

while trying first time its not working and working second time.

Note: We didn’t face this error when working in Proto (Test) environment. Development team copied to a new QC environment where security matrix is applied for all Users.

Please help us to resolve this issue.

Thanks in advance.