Content of the FOB file

I have been wondering if it’s possible to do a compare of two FOB files and see what has been changed. And of cause it’s possible. But I’m not a binary geek and I really want to see the same result as if you where comparing two text files.

So what I’m actually asking is: Is it possible to extract the source text from the FOB file?

Maybe not directly, but somehow in “smart” way?

Alternatively is there a way where I can “read” the source code of an object automatically into a different object? I’m thinking this is sort of what is being done in CodeGenius?

I know I maybe have a bit too much time available right now to ask this, but I was just thinking that this could be cool!

Can you explain a little bit more about your second question?

What I did in one of my objects was that I’m reading the binary (BLOB) from an object, change it and write it back so it behaves differently after this.
Reason for this is to call a “Form.RUN(RecRef)” or “Report.RUN(RecRef)” which is usually not possible in NAV.

Hi Thomas,

What are you saying? Did you find a way to run a form based on a recref??

Yip, and I make heavy use of it for our touch based POS system.

Hey, please tell more tell more! THAT’S WHAT I’VE BEEN LOOKING FOR FOR A LONG TIME! [:)]

And the usage of it is quite simple. all you need is two different codeunits.

The calling code looks a kind of this:


cu1.ChangeTableNoInCU(RecRef.Number);
cu2.RunForm(50000, RecRef, '1=0(RED)'); // means filter to field1 (code) with CONST(RED)

The functions we can use are:

RunForm(FormNo : Integer, VAR RecRef : RecordRef, View : Text250);
RunLookup(FormNo : Integer, VAR RecRef : RecordRef, View : Text250) : Boolean
RunReport(ReportId : Integer, VAR RecRef : RecordRef, View : Text250, UseReqForm : Boolean)
RunDataport(DataportId : Integer, VAR RecRef : RecordRef, View : Text250)
RunCodeunit(CodeunitId : Integer, VAR RecRef : RecordRef, View : Text250)
RunCodeunitConditional(CodeunitId : Integer, VAR RecRef : RecordRef, View : Text250) : Boolean

and can you get to the return value of the lookup?

Thanks, looks interesting, but then what do you need in those two codeunits except for the 6 functions in CU2?

Just to bring us back on topic (although the other topic of running forms with recordrefs is very interesting also), then the best I’ve found so far is:
http://www.gotcal.com/2008/3/24/gotcalcsideinstaller-source.aspx

Our good old member Søren Nielsen has here created a function that sort of reads the text. But it’s in a separate program. I would like to see it in a automation class control where can use it directly from within.

Yep, is returned in the RecRef in the same way as in “IF Form.RUNMODAL(50000, rec) == ACTION::LOOKUPOK THEN …”

Where would you leave the text imported from NAV or exported to NAV ?

Do you need that somehow?

Erik is currently testing an automation version of the the cool tool which the good old member Søren Nielsen has created.
As soon as these tests are finshed successfully we will publish the results to enable everybody to read/save and compile NAV objects in text format from within C/AL code.

Hi Thomas,
Yes I am. And right now it’s looking great. I just need to get a bit better understanding for working with streams… (got any tips for great links regarding streams)?

Hi Thomas,

Can you explain a little bit more about “Form.RUN(RecRef)” pls

with example

Hi,

I’m not gonna spread this top secret information as it is part of a copyright protected solution.

It is part of Dynamic Retail, THE retail solution for Microsoft Dynamics NAV

Hi,

I’m not gonna spread this top secret information as it is part of a copyright protected solution.

It is part of Dynamic Retail, THE retail solution for Microsoft Dynamics NAV