hi good evening,
i am running a form fixed assets
in this we have card and sub forms,in subform we have acquisition cost field.
the values in the acquisition cost field must effect the amount field in the fa journal line
i have written the code in FA Depreciation Book table
in acquisition cost onvalidate()
temprec.RESET;
"Acquisition Cost" :=0;
temprec.SETRANGE(temprec."FA No.","FA No.");
IF temprec.FINDFIRST THEN
REPEAT
temprec.INSERT;
temprec.Amount +="Acquisition Cost";
temprec.MODIFY;
UNTIL temprec.NEXT=0;
i have written the code as shown above but it was not effecting in the amount field;
is it correct or wrong can any one suggest me please
thanks
0
Comments
if not why did you write code in acquisition cost onvalidate() trigger?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
thanks for giving reply
i dont know where i have to write the code ,
i tried a little bit with this code ..
i am not entering any values .
can any one suggest me please
thanks
But still I suggest you to read form triggers and control triggers how to use and when to use..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
http://msdn.microsoft.com/en-us/library/dd301068.aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org
i have tried this code to enter the values from report to forms..
where i have taken one data-item fixed assets
and two temporary records fa journal line and fadepreciation book
i kept the property processing only=yes..
while running the report it was showing all the acquistioncost..
but my actual requirement is the values in the acquistioncost must be inserted into the amount field in the journal line form
is it possible through this coding ,
can any one suggest me ..
thanks
Fixed Asset - OnAfterGetRecord()
fadebook.RESET;
fadebook.SETRANGE(fadebook."FA No.","Fixed Asset"."No.");
IF fadebook.FINDFIRST THEN
fadebook.CALCFIELDS(fadebook."Acquisition Cost");
MESSAGE('%1',fadebook."Acquisition Cost") ;
linecount:=0;
fajline.SETRANGE(fajline."Journal Template Name",'ASSETS');
fajline.SETRANGE(fajline."Journal Batch Name",'default');
fajline.INIT;
fajline.VALIDATE(fajline."Journal Template Name",'ASSETS');
fajline.VALIDATE(fajline."Journal Batch Name",'default');
IF NOT fajline.FINDLAST THEN
fajline."Line No." :=linecount+10000
ELSE
fajline."Line No.":=fajline."Line No."+10000;
fajline.INSERT;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
for your reply
i am sending the screen shot ,what the form is actually effecting after writing this code
what else are you expecting from your code?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
the above screen shot where i have shared to you.
is displaying only one number multiple times.
where the amount field is 0.00
but in fadepriciation book consist of acquistion field
which consist of values
32000
45000 and so on
these values must be inserted in the place of amount field
instead of 0.00 values
is it possible
can you suggest me
i sharing the screen shot what the actual output i got in the amount field
You didnt write to insert FA No. in above code but it is shown in attached scrren.
Please share all Code whatever you have written.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
i haven't written any code .what i have written i shared to you can you please suggest me
thank you
Can you tell me please?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
while i writing only this code in onaftergetrecord()
fadebook.RESET;
fadebook.SETRANGE(fadebook."FA No.","Fixed Asset"."No.");
IF fadebook.FINDFIRST THEN
fadebook.CALCFIELDS(fadebook."Acquisition Cost");
MESSAGE('%1',fadebook."Acquisition Cost");
and running the report,there were no records updating in the table journal line
while i writing only this code in onaftergetrecord()
fajline.RESET;
linecount:=0;
fajline.SETRANGE(fajline."Journal Template Name",'ASSETS');
fajline.SETRANGE(fajline."Journal Batch Name",'default');
fajline.INIT;
fajline.VALIDATE(fajline."Journal Template Name",'ASSETS');
fajline.VALIDATE(fajline."Journal Batch Name",'default');
IF NOT fajline.FINDLAST THEN
fajline."Line No." :=linecount+10000
ELSE
fajline."Line No.":=fajline."Line No."+10000;
fajline.INSERT;
the table journal line was updating the records of about 10 records
this is what going on sir
what i am getting is that i have done mistakes in second code
is it right
can any one suggest me the code
thanks
Fixed Asset - OnAfterGetRecord()
i have modified the code that is (fajline.Amount :=fadebook."Acquisition Cost";)
after writing this code the amount field is getting/inserting values in fajournalline but the fano is same for all the amount fields i am sharing the screen shot what i got.
fadebook.RESET;
fadebook.SETRANGE(fadebook."FA No.","Fixed Asset"."No.");
IF fadebook.FINDFIRST THEN
fadebook.CALCFIELDS(fadebook."Acquisition Cost");
MESSAGE('%1',fadebook."Acquisition Cost");
fajline.RESET;
linecount:=0;
fajline.INIT;
fajline.SETRANGE(fajline."Journal Template Name",'ASSETS');
fajline.SETRANGE(fajline."Journal Batch Name",'default');
fajline.VALIDATE(fajline."Journal Template Name",'ASSETS');
fajline.VALIDATE(fajline."Journal Batch Name",'default');
IF NOT fajline.FINDLAST THEN
fajline."Line No." :=linecount+10000
ELSE
fajline."Line No.":=fajline."Line No."+10000;
fajline.Amount :=fadebook."Acquisition Cost";
fajline.INSERT;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav