Is it possible to mark object by code?

Solmyr
Member Posts: 51
if I run such code:
the Form 90000 will have modified flag set to "No" but won't be marked in object designer. is it possible to mark objects by code? maybe with some additional automation?
I found this post, the "report to mark all licensed objects" looks like what I'm looking for, but link is dead...
Object@1000 : Record 2000000001; Object.SETRANGE(Type,Object.Type::Form); Object.SETRANGE(ID,90000); Object.FINDFIRST; Object.MARK(TRUE); Object.Modified := FALSE; Object.MODIFY;
the Form 90000 will have modified flag set to "No" but won't be marked in object designer. is it possible to mark objects by code? maybe with some additional automation?
I found this post, the "report to mark all licensed objects" looks like what I'm looking for, but link is dead...
Oleg Dovgalenko
0
Comments
-
Hi Solmyr,
You will not be able to mark them is the object designer form but you can create a seperate list form of you own. What are you tring to acheive?0 -
If you are want to do it in object designer, you can create a filter and display that filter.0
-
DaveT wrote:What are you tring to acheive?
I have a text file with NAV objects. the aim is mark the objects which are in the text file in the object designer. I've done it before through setting modified flag to true, then adding filter Modified = Yes. but now it's not applicable, because I have to save modified state as it was. of course I can set date or time to some unique value and add filter, but it would be nice to use marks.Oleg Dovgalenko0 -
you can use the compile field0
-
Or use the "Version List".
I have created some reports, which mark objects based on...
... objects in a fob/fbk file
... objects in a txt file (NAV Compare Tool required)
... text files in a folder of your file system
... object list in an Excel Sheet (based on copy/paste from Object Designer or Import Worksheet)
With this reports you can choose, how you want to mark the objects:
- Set Modify flag
- Set Date
- Set Time
- Add a char at the beginning of the Version List
The website is in german but the downloadable objects include DEU and ENU language.Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
I've found easy solution to mark objects by code. It can be achieved via WinShell automation.
Simple function to mark particular object:Parameters: Var Name DataType Subtype Length No pType Option No pID Integer Locals: Name DataType Subtype Length Counter Integer StrNo Text 50 CREATE(lvWinShell); lvWinShell.SendKeys('+{F12}'); CASE pType OF pType::Table: lvWinShell.SendKeys('%b'); pType::Form: lvWinShell.SendKeys('%m'); pType::Report: lvWinShell.SendKeys('%p'); pType::Dataport: lvWinShell.SendKeys('%o'); pType::Codeunit: lvWinShell.SendKeys('%c'); END; lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{LEFT}'); lvWinShell.SendKeys('{RIGHT}'); lvWinShell.SendKeys('^F'); StrNo := FORMAT(pID); FOR Counter := 1 TO STRLEN(StrNo) DO lvWinShell.SendKeys(FORMAT(StrNo[Counter])); lvWinShell.SendKeys('{ENTER}'); lvWinShell.SendKeys('^{F1}'); CLEAR(lvWinShell);
It's not the best way but it worksOleg Dovgalenko0 -
Solmyr wrote:if I run such code:
Object@1000 : Record 2000000001; Object.SETRANGE(Type,Object.Type::Form); Object.SETRANGE(ID,90000); Object.FINDFIRST; Object.MARK(TRUE); Object.Modified := FALSE; Object.MODIFY;
the Form 90000 will have modified flag set to "No" but won't be marked in object designer. is it possible to mark objects by code? maybe with some additional automation?
I found this post, the "report to mark all licensed objects" looks like what I'm looking for, but link is dead...
Object.RESET;
Object.SETRANGE(Type, Object.Type::Table);
Object.MODIFYALL(Modified, FALSE, TRUE);That's what she said!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