Hi experts,
In customer ledger entries u have a field Document type. In that field u have options . Just i want 2options credit memo, payment,. when u post some transactions with these above options that must be in bold.I am getting colour for these two options. And the same time i want bold also.
CASE "Document Type" OF
"Document Type"::"Credit Memo" :
CurrForm."Document Type".UPDATEFORECOLOR(255);
"Document Type"::Payment :
CurrForm."Document Type".UPDATEFORECOLOR(16711680);
ELSE
CurrForm."Document Type".UPDATEFORECOLOR(0);
END;
I getting some errors when write code for bold. That code is CurrForm."Document Type".UPDATEFONTBOLD(TRUE).
But i am not getting where to write that code. I am not much coder like U.
I am learner. Please provide solution . How to get bold for only above transactions.
where i have to write.
Thanks in advance.
lally
0
Comments
but u have to put it in form for wanted field in OnFormat trigger
but u have to put it in form for wanted field in OnFormat trigger
Thank you merana,
I think that u did not read that above query what i mentioned about my problem with BOLD. I know that this will work very well in the case of colours. i put that code in on format trigger.But in the case of bold iam not getting errors .I want bold.how to get that bold.Please provide solution for bold
I hope now can understand my problem.
thanks in advance
http://www.BiloBeauty.com
http://www.autismspeaks.org
Please provide solution. Experts u should throw some light to me how to solve this problem. How to get bold for hilighted fields with colour. Solve this this issue. Please rovide solution.
I hope u can provide solution now.
thanks
1) Put on the ONFormat Trigger of the Field
2) Use the example to change your code.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks for U r help.I am not much coder like u. I am learning right now.
Please Excuse for this actually i forgot one thing in above my post. In above query Posting date also has to highlight with releavent type.
Please provide this one also. I hope can solve this one.
Thanks
http://www.BiloBeauty.com
http://www.autismspeaks.org
Special thanks to u.what u suggested me about that Bold of posting date might be wrong, because every posting date is getting bold. I should not have like that, what I want is
When the credit memo of document type get blue colour ,only that posting date has to get that credit memo colur and bold.
Ex :- posting date document type
03/07/07(blue) credit memo(blue)
I want like that , so please do this help. I hope now u got what I want. Please provide solution.
Thanks and regards
OnFormat of Documetn Type:
OnFormat of Posting Date:
So, only when it's a credit memo, the posting date is going to have the same settings as document type.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
. Sorry for extending this query ,
I am trying my self and I am not getting that what I want. That’s why I am extending this query.What u explained waldo & savatage is working properly. Now a small modification when that document type is credit memo it will get one colour.But not only that document type field but that total record has to get that same colour and bold what document type has . Please provide solution . Sorry for extending this query
Sorry for the trouble
I hope you will help me guys....
Thank you
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
I tried already what u mentioned. But as per my knowledge I think that above process what I done is not correct. Because in a form u have 40 fields, do we need to add up to 40 fields. Please think about this one. Is it not possible with out adding code to all fields in a form.? I hope u know that code.
Please forward that one. Please consider this request.
Sorry for extending this query ,
I hope I can understand my problem correctly................
Thanks and regards
But you could "bundle" a lot in one function (easier to maintain), and call that function from each codeunit.
One remark with that: you cant update a color of a field when you're not in that OnFormat Trigger ... so when creating one function, you should foresee that only the right code for that specific field is executed.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
One more special thanks to u r suggestions and solutions.
Could u explain that what mentioned above . I could not Under stand l.
Sorry for the trouble. Please excuse me to extend this query.
Thanks
If you want an entire line to be bold & a color depending on some situation (say "Credit Memo") then you must go to each field and place the code in the OnFormat trigger of each field. All you have to do is make a small change to the code. (I'm just using a section of the full code as an example)
for example on the OnFormat of "Psoting Date" it should refer to Posting Date
CurrForm."Posting Date".UPDATEFORECOLOR(255);
CurrForm."Posting Date".UPDATEFONTBOLD(TRUE);
On Document type go to the Onformat of that field & change the code
CurrForm."Document Type".UPDATEFORECOLOR(255);
CurrForm."Document Type".UPDATEFONTBOLD(TRUE);
On Amount field go to OnFormat & change the code again
CurrForm.Amount.UPDATEFORECOLOR(255);
CurrForm.Amount.UPDATEFONTBOLD(TRUE);
& so on & so on for every field you have showing.
Now once you got this down you can maybe think about calling codeunits. A good alternate solution but perhaps a bit advanced for a novice.
Baby Steps
http://www.BiloBeauty.com
http://www.autismspeaks.org
Posted too late ...
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
what u mentioned above for each field individually hilight with out any condition.
I think u are not understanding my second query.What i would like to have
when the Document Type = Credit memo then only that total record has to get colour and bold.
when one case is true then total record has to get that clour and bold.
I hope now u can understand this one.
i hope u can provide solution..............
thanks
This is as far as I can go on this topic.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Everything you need (and more) is in this thread.
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog