General ledger entry insertion from CAL

i want to set dimension code for transactions passed without it and before it is forced and the code below couldn't do it,what is wrong with it,what did i miss.


GLE.SETRANGE("Posting Date",010115D,010515D);
GLE.SETFILTER(GLE."Global Dimension 1 Code",' ');
IF GLE.FINDSET THEN
   REPEAT
      GLE."Global Dimension 1 Code":='012';
      GLE.Modify;
   UNTIL GLE.NEXT = 0;

Related
Recommended