Table 37 "Sales Line" - Modify didn't exist in older version

viriatoviriato Member Posts: 105
Hi,

I encountered a problem when moving some code from version 3.6 to 5.0 SP1, I looked where the problem was arising and I noticed that in version 3.6 this standard code didn't have the following code line (see code bellow). Can someone please explain why this MODIFY is now needed thank you.
ValidateShortcutDimCode(FieldNumber : Integer;VAR ShortcutDimCode : Code[20])
DimMgt.ValidateDimValueCode(FieldNumber,ShortcutDimCode);
IF "Line No." <> 0 THEN BEGIN
  DimMgt.SaveDocDim(
    DATABASE::"Sales Line","Document Type","Document No.",
    "Line No.",FieldNumber,ShortcutDimCode);
//  MODIFY;                                  <---------------------------------------------------------------- this line
END ELSE
  DimMgt.SaveTempDim(FieldNumber,ShortcutDimCode);

Comments

  • DenSterDenSter Member Posts: 8,304
    Usually a MODIFY is to write the record to the database, so there must have been an issue with the way it was in previous versions. Without debugging the process in both versions there's really no way to tell why it was put in there. There's usually a good reason for it though.
  • viriatoviriato Member Posts: 105
    Thanks again Daniel.
Sign In or Register to comment.