IF TempDimSetEntry."Dimension Value Code" <> '' THEN BEGIN /// my custom code 20131202 RC START: add the dimension values to their table if they don't exit GRec_DimensionValue.RESET; GRec_DimensionValue.SETRANGE(Code ,TempDimSetEntry."Dimension Value Code"); GRec_DimensionValue.SETRANGE("Dimension Code", TempDimSetEntry."Dimension Code"); IF GRec_DimensionValue.FINDFIRST = FALSE THEN BEGIN GRec_DimensionValue.INIT; GRec_DimensionValue."Dimension Code" := TempDimSetEntry."Dimension Code"; GRec_DimensionValue.Code := TempDimSetEntry."Dimension Value Code"; GRec_DimensionValue.INSERT; MESSAGE('DimensionValue Created: %1',GRec_DimensionValue.Code); END; /// end of my custom code RC stop TempDimSetEntry.INSERT(TRUE);
Window.UPDATE(3,Text011); SQLMgt.GetSQLConnection(SQLConnection); SQLConnection.Open; SQLCommand := SQLCommand.SqlCommand; SQLCommand.Connection := SQLConnection; SQLCommand.CommandTimeout(0); // wait indefinitely for the command to finish. IF ParentTableID <> 0 THEN BEGIN KeyOffset := 0; SQLCommand.CommandText := UpdateLedgerEntryTableQry(ParentTableID,KeyOffset,DestDimFieldName); SQLCommand.CommandTimeout(0); // wait indefinitely for the command to finish. SQLCommand.ExecuteNonQuery; END ELSE BEGIN SQLMgt.GetSQLConnection(SQLConnection2); SQLConnection2.Open; SQLCommand2 := SQLCommand2.SqlCommand(TableIDReaderQry,SQLConnection2); SQLCommand2.CommandTimeout(0); // wait indefinitely for the command to finish. SQLReader := SQLCommand2.ExecuteReader; IF SQLReader.HasRows THEN WHILE SQLReader.Read DO BEGIN ParentTableID2 := SQLReader.GetInt32(0); // Parent Table ID Window.UPDATE(2,GetTableName(ParentTableID2)); ....
Comments
Instead look at your data and find the bad data and clean up the data.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Did you find a solution of issue?
I am also facing the same issue during upgrade Step 2 NAV 2009 TO NAV 2013.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page