FA.GET("No."); FADeprBook.SETRANGE("FA No.", FA."No."); FASetup.GET; //FAClass.GET; IF FADeprBook.FINDSET THEN IF FASetup."Default Depr. Book" <> '' THEN BEGIN FADeprBook.SETRANGE("Depreciation Book Code", FASetup."Default Depr. Book"); IF FADeprBook.FINDFIRST = TRUE THEN IF xRec."FA Class Code" = '' THEN BEGIN FADeprBook."FA Posting Group" := Rec."FA Class Code"; FAClass.SETFILTER(Code, Rec."FA Class Code"); IF FAClass.FINDSET THEN REPEAT FADeprBook."No. of Depreciation Years" := FAClass."Default Years"; // WORKS Perfectly FADeprBook."Depreciation Method" := FAClass."Default Method"; //************* DOES NOT WORK UNTIL FAClass.NEXT = 0; END ELSE IF CONFIRM ('Do you want to change the FA Posting Group on Depreciation Book %1?', TRUE, FASetup."Default Depr. Book") THEN BEGIN FADeprBook."FA Posting Group" := Rec."FA Class Code"; FAClass.SETFILTER(Code, Rec."FA Class Code"); IF FAClass.FINDSET THEN REPEAT FADeprBook."No. of Depreciation Years" := FAClass."Default Years"; // WORKS Perfectly FADeprBook."Depreciation Method" := FAClass."Default Method"; //************* DOES NOT work. UNTIL FAClass.NEXT = 0; END ELSE Rec."FA Class Code" := xRec."FA Class Code"; END; FADeprBook.MODIFY;
Answers
That is why it was messing it up.
and you have an option issue.
edit::When adjusting option fields like adding values, you have to find where else in the system they are used else you can cause yourself an error due to a mismatch.
http://www.BiloBeauty.com
http://www.autismspeaks.org
I know that GET statement fetches the primary keys of the table. Lets say the Primary Key of the Table (lets call the table 'FA') is: FA No. & FA Depreciation Book Code
Can someone clarify the difference between these 3 statements:
1) FA.GET;
2) FA.GET (FAdeprBook."No.");
3) FA.GET (FAdeprBook."No.", FAdeprBook."Depreciation Code");
I know it a silly question, but I just want this clarification before I misunderstand the concept.
i know the concept, i just want to make sure what I know is the correct...
You use GET to retrieve one and only one record from the database, for which you know all of the primary key values. If you don't know all of the primary key values, and you still use GET, you are using the wrong keyword.
RIS Plus, LLC
1) FA.GET (FAdeprBook."No.");
2) FA.GET;
If you don't have all primary key values, you set filters and you use one of the FIND statements (FINDFIRST, FINDLAST, FINDSET) to retrieve the records.
RIS Plus, LLC
Add them to your favorites.
http://msdn.microsoft.com/en-us/library/dd301056.aspx
http://msdn.microsoft.com/en-us/library/dd355032
http://www.BiloBeauty.com
http://www.autismspeaks.org
If yes, they never ask basic technical questions. :thumbsdown:
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Just a happy frood who knows where his towel is
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
The usual steps for calling help should be
a: is it a tech question or a business question?
b: for tech questions: is it beginner, advanced or exotic?
Beginner: F1, Advanced: Manual, Exotic: Mibuso \:D/
|To-Increase|