Hello. I am trying to resolve an issue for two days. I have to add a custom dimension to dimension set on Sales Order. Here is the case:
I am creating the sales order from CRM sales order. Creating SO in NAV, values of the standard dimensions (Responsibility Center, Customer, Salesperson, Campaign and Customer Template) are copied to the dimension set and assigned to SO. Now I need to add to this custom CRM_ORDERNO set. Of course, I have created the dimension value earlier.
Reading some articles in the Internet I managed to get to the stage with this code:
// TempDimEntrySet : TEMPORARY Record [Dimension Set Entry]
TempDimEntrySet.INIT;
TempDimEntrySet.VALIDATE("Dimeniosn Set ID", SalesHeader."Dimension Set ID");
TempDimEntrySet.VALIDATE("Dimension Code", 'CRM_SALESORDER'); // opentext value for better understood
TempDimEntrySet.VALIDATE("Dimension Value Code", 'ORD-1234-XYZ'); // opentext value for better understood
TempDimEntrySet.INSERT(TRUE);
NewSetID := DimMgt.GetDimensionSetID(TempDimEntrySet);
SalesHeader."Dimension Set ID" := NewSetID;
SalesHeader.MODIFY;
The effect is that I have a new Dimension Set with ONE dimension CRM_SALESORDER. Now, what shoud I do to put all dimension values (standard and mine) in one SET?
Best regards!
*This post is locked for comments
I have the same question (0)