Hi everyone,
I had one code problem here. I want try to change the the line section as follow:
i) Line no. with ID 1000 -Description 'Bicycle' change to test777,
ii) Line no.with ID 1120-Description 'spokes' change to test888.
iii)Line no .with ID 1001-quantity '1' change to 10
Here are the code that I had try to scratch out, but the output not been successful as I mentioned above.
Here is the code for change description part:
g_recSalesLine.SETRANGE("Line No.","Line No."); g_recSalesLine.SETRANGE("Document Type","Document Type"); g_recSalesLine.SETRANGE("Document No.","Document No."); IF g_recSalesLine.FINDFIRST THEN BEGIN g_recSalesLine.SETRANGE("Description",'Bicycle','Bicycle'); g_recSalesLine.Description := g_txtDesc; g_recSalesLine.MODIFYALL(Description,'TEST11'); END;
One question for this description part, for example: is it I have to used the Line no. ='1000', then the description will direct change to test777? And Line No. ='1120', then change to test 888?
Between can somebody tell me how to modify my code above?
Another part is the quantity, below are the code of quantity that I had scratch out:
g_recSalesLine.SETRANGE(Quantity,Quantity); IF g_recSalesLine.FINDFIRST THEN BEGIN g_recSalesLine.Quantity := g_decQty; g_recSalesLine.MODIFY; END;
If I used the code of quantity, it will direct change all 3 lines of quantity to '10',but not only Line No. ='1001'(I only want to change the quantity to 10 with Line No. ='1001'.
Hope anyone can help me out for the problem above.
Many thanks here.