Code-correct or not-Help

idontknowidontknow Member Posts: 66
Hi...Can you please check and tell whether this code will work or not
ILE = Item ledger entry
SL = Sales line

Purpose :If the item on SL matches with the item on ILE,and if the Branch code in ILE is not empty then i have to check the Branch code on SL and if it is empty then the system has to throw a message to fill that field.
ILE.SETRANGE(ILE."Item No.",SL."No.");
IF ILE.FINDFIRST THEN
  IF ILE."Branch code" <> ' ' THEN
 SL.TESTFIELD(SL."Branch Code");

The last line is not working for me.So can anyone suggest me any other alternative or corrections in the same are appreciated...

Answers

  • philippegirodphilippegirod Member Posts: 191
    SL.TESTFIELD(SL."Branch Code");
    
    is not correct, it must be
    SL.TESTFIELD("Branch Code");
    
    My candle burns by both ends, it will not last the night,
    But oh my foes and oh my friends, it gives a lovely light
  • kapamaroukapamarou Member Posts: 1,152
    "Branch Code" is not a standard field. Could it be a flowfield? :-k
  • ssinglassingla Member Posts: 2,973
    Seems to be a Global Dimension
    CA Sandeep Singla
    http://ssdynamics.co.in
Sign In or Register to comment.