Comment button

ab
Member Posts: 37
Hi,
Where can I find the code that changes the comment button when there are comment lines, for example on the sales header,
into a comment button with lines ?
Thx
Where can I find the code that changes the comment button when there are comment lines, for example on the sales header,
into a comment button with lines ?
Thx
0
Comments
-
If you are talking about the pencil icon for the comments then it goes as follows:
The Icon is a picture box with sourceexpression Comment which is a flow field of table 36 leading to values True And False.Then at property BitmapList 7,6 , 7 being the FALSE and 6 being the TRUE...0 -
That's perfect !!!!
Thx0 -
You're welcome.
You can also do the same thing for option fields...0 -
Hello ab,
I'm not sure if you are experiencing the same issue as we did or if you are looking to use this functionality somewhere else but....
We found it very hard to tell if a comment existed on a sales quote or order, simply because there was little difference in the true/false state of the bitmap.
Users were missing key comments all the time, simply because they didn't notice that a comment existed.
We renamed the original picture box 'CommentDoesNotExist' and added a 2nd picture box called 'CommentExists'.
We layered the 'CommentExists' picture box right underneath the 'CommentDoesNotExist' picture box (identical Bitmap, SourceExpr, XPos, YPos, Width, Height, etc.).
We then set the BackColor of the 'CommentExists' picture box to 6094847 (Bright Yellow).
Lastly, we added the following code to toggle the visible state of the two picture boxes.
Global Variable:
Name SalesComment
DataType Record
Subtype Sales Comment LineForm - OnAfterGetRecord() SalesComment.RESET; SalesComment.SETRANGE("Document Type", "Document Type"); SalesComment.SETRANGE("No.", "No."); IF SalesComment.FIND('-') THEN BEGIN CurrForm.CommentExists.VISIBLE := TRUE; CurrForm.CommentDoesNotExist.VISIBLE := FALSE; END ELSE BEGIN CurrForm.CommentExists.VISIBLE := FALSE; CurrForm.CommentDoesNotExist.VISIBLE := TRUE; END;
The default pencil (with no lines) bitmap is shown when there is no comment, but now the pencil (with lines) bitmap is surrounded by a bright yellow background which is very noticeable when a comment exists. We've enabled similar functionality in many other forms.
I hope this helps.0 -
another quick way to change the bitmap so it's more visible is create your own pic
Property...
BitmapList=7,c:\notes.bmp
Where C:\Notes.bmp is something New and more visible
Once compiled, it's set in Nav!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions