Drilldown button

Hi Guys,

New to Dynamics NAV, I wish to create a drill down button on one of the forms (let’s say Sales Invoice > Invoicing)

I have experience of Accpac which allows you to use the control and in VB add buttons to the form and as such add actions (in this case a lookup for an image of the document in my database.)

Is the same possible in Dynamics NAV 2009 and if so how does one make a start? I can’t seem to find any information on it?

Many thanks in advance for any advice.

Pete.

Hi,

YOu need to use textbox and write a code on onlookup trigger .

If you are adding a field in table then use field property Tablerelation for lookup any form.

Hi Thanks for the reply but if I could just elabourate a little …

I’m after a way of creating a drilldown button on a typical screen. I’m using the demo data, below is an example:

Select Company > CRONUS International Ltd. > Home > Sales Invoices > double click on entry > 103004 . Guildford Water Department > click Invoicing > BUTTON TO DISPLAY HERE

I intend to use the button on these screens which when pressed launches a .NET application I’ve made which displays an image of the entry scanned in using our proprietary file system. (The information will be based on a lookup, this is already done.)

What I don’t know how to do is how to physically edit a form to add a button or indeed anything! I’ve come across various msdn articles which detail creating new forms, but my licensing (via the MSDN subscription) states I’m not permitted to do this. Indeed, when I try to edit a form and save it, it states I lack permission.

What I need to understand is:

a. What steps do I take to add a button to a form
b. Aside from obtaining a developer licence, assuming I do how would one distribute the facility without a customer also needing this level of licensing?

I hope this makes sense, help v much appreciated.

Pete.

Hi Guys,

I wondered if there was any responce to this?

Thanks in advance.

“What steps do I take to add a button to a form”? Hm - open the form in design-mode, select the toolbox, select the command-button and click on the form where you want to place your button. Remember the glue’s!

With a demo-license you are allowed modify standard forms 21 and 22, and you may create forms 99998 and 99999 - that is all regarding forms.

To a perform some action from the button you have to use the properties. With a demo license your are not allowed to code any action to the button (=use trigger OnPuch or OnActivate) - which probably is more relevant in your case.

So - correct, a developer’s license makes life far more easy when making changes in Dynamics NAV! And that is probably what you need here. Together with some training and practice in developing NAV.

How to distribute your changes? Export your changed object from your database and import at the customer’s site. The customer does not need anything special if your only change a standard-form.

Thanks Anfinnur, you’re the man! We’re in the process of sorting out the licencing so hopefully we can get to the bottom of it.

Just to add, as a partner we are entitled to the relevant licencing which I applied for yesterday. I’m assured that this will us to do some editing of the necessary forms. I’ve also bought michael nielsen’s programming in dynamics nav 2009 book so that should help me out.

Thanks again all who’ve posted. :slight_smile:

Thanks for your time Anfinnur but be gentle, I’m very new at this. I’m still not clicking with how all this hangs together …

I now have a full developers licence allowing me to edit any form I like:

  1. Open classic client (with SQL)

  2. Tools > Object Designer > Form > ID 51 Purchase Invoice (the form I want to add a button too)

  3. Toolbox > select command button, draw on form in designer. I’m not doing anything with it, simply drawing it on the form. (Which is possibly my mistake but for now I simply want something to display.)

  4. Exit > Asked to save changes and do so.

Open RTC > Select CRONUS International Ltd > Departments > Purchase > Order Processing > Purchase Invoices > Open London Postmaster, no button displays.

Both are connecting to the same database.

It’s no more complicated that that - draw a button in the classic designer so it displays in the RTC - but no matter what I do, nothing will display. I realise this is very simple but again I’m starting from first principles. Please can you give me simple concise instructions as to what I’m missing, this is how every other form designer I’ve worked on works and is usually a 2 minute job!

Can you be able to see the button in classic?

if NO, set HorzGlue = RIGHT

VertGlue = Bottom

In order to see this button in RTC, you need to do Form Transformation…

Search the forum for Form Transformation, you will get steps to do…

BTW, you do not need to do a form transformation to achieve this.

You can always amend the page object directly if you want to.

By mistake if you(or any one) transform all forms and import, you will losse all the modifications in pages.

it is a preferred way to do…

Hi Guys,

Thank you for your help so far, in answer to your question when I run the Form in the classic client, I DO see the button. To do ma hello world would be ideal for now, I will worry about what code goes underneath them.

I need this: CLICK HERE

To appear like this: CLICK HERE

Is this the right way to do it?

I don’t understand why I need to transform the form, it already exists, I just want to add a couple of buttons to it! If you are clear on what I am trying to do can you please give me instructions on how to do this.

Why did you add them in header?

you should add them besides invoice menu button at bottom…

if you want to see the buttons in page, you need to transform it into page.

in page you will get them in Actions–>View Image

and Actions–>Print balance

Or you can directly go to page and add the Buttons in Action designer…

Forms are Classic Client only. The RTC displays pages.

You do form transformation if you migrate from CC to RTC or if you run in mixed mode and you do not want to do double work maintaining both objects.

You can directly modify the page.

  1. Open classic client (with SQL)

  2. Tools > Object Designer > Page > ID 51 Purchase Invoice

  3. There is no graphical designer for a Page. Go to the last (empty) line. Select View > Actions.

  4. Add a new line with Type = Action. Select Properties and set Promoted=Yes, PromotedCategory=Process.

Then you will see a button at the top where “Copy Document” etc. is.

Sooo very close!

Ok, I followed your excellent instructions, 1 - 4, created action View Image

I go into the RTC > open the WoodMart Supply Co. Purchase Invoice > Customize this page > Action Pane > Process > Actions > Add > Functions

View Image is in the list!

However, if I select to add this and reload the page, it still doesn’t display. What step have I missed?

Again I just need to understand the relationship between the actual command button and the action it’s associated with then I’ll have it working.

If you do not put any code behind the Action, or specify a RunObject property, then nothing will display. F9 to view the code when on the action, or set the property and run the Codeunit you need to execute.

Success! My buttons are appearing and I’m now working on the code beneath the action.

You guys are the best! … Not to mention very patient with a novice :slight_smile: