Hi all,
I'm a complete newbie to form design/modification, having spent the past few weeks teaching myself the basics (not on our live database I must add!). But now I want to get into some more complicated stuff that, at the moment, is beyond me. (This is in Navision 3.60, I almost forgot to mention that!).
What I'd like to do is modify Form 130, Posted Sales Shipment, in three ways:
1. Remove 'Undo Shipment' from the Functions menu and create a new button to perform this action.
2. Turn the 'No.' field on the header into a lookup field that links to and opens the relevant Sales Order.
3. Have the name of the user that performs the 'undo shipment' action appear on the posted sales shipment header.
And here's what I've done so far:
1. I've removed (well, hidden) access to 'Undo Shipment' off the menu and have created a new button. But how do I make this new button perform the undo shipment action?
2. I can't get this to work at all. I can edit the field properties and set it to Lookup = Yes, and set the LookupFormID to Sales Order (42), but nothing happens when you click in the field and do a lookup.
3. This one isn't as important (at the moment), but it would be nice if I could get this working.
By now I expect one or two of you are saying that I should go on a course to learn these things. Well, that would be nice, but this sort of thing isn't really part of my job so I can't justify asking my boss if the company will pay for me to learn this stuff. Maybe there are some training guides or manuals out there that I would find useful? How difficult is it to learn these things? I'm prepared to put in the hours out of work because I really think it will be a benefit to be able to do this.
Thanks for the help!
0
Comments
1.) If you go ot the menu item undo shipment in the function button and press F9 you should see some C/AL code (program lines) Copy past these to the same trigger (OnPush) of the new button you made. Little tip, make sure the glue properties of your new button are correct.
2.) Do NOT change the No field into a look-up, this is not Navision style. Keep programming like standaard Navision! What you could do is program a new function menu item that shows this list you want. If you need help on this one, just ask.
3.) You will have to log this per line. Different people can undo different lines. So create an extra field in the sales shipment line table and fill in from the codeunit thal undo's the sipment. This is called something like "Undo sales shipment line" or something. But again, you'll need a developers license.
If it was hard to write, it should be hard to understand."
We do indeed have a development license, so your time was certainly not wasted
I've now got No.1 on my list working (it's easy when you know how!) and plan to have a look at your suggestions for No's 2 & 3 later today. So thanks for the help so far, but I may be back for more later!
I've set the C/AL code OnLookup to FORM.RUN(42) on the Order No. field. The lookup now works but doesn't take you to the required record (ie, the currently selected Order No.). How do I do this?
Thanks!
If it was hard to write, it should be hard to understand."
Thanks for your help with this
Just post if you need some extra help!
If it was hard to write, it should be hard to understand."