Disabling F4 – Stopping inadvertent Delete

Can we disable the F4 function button in Navision?

Few years back, I had a situation in one of my implementation, where users used to delete the sales order inadvertently by pressing F4 (Their intention was to create a new order by pressing F3).

Now how to stop it. I had solved it in a very simple way by creating a new dummy menu item in one of the menu button present in the order window and assigning F4 as the shortcut key to that menu item. It just overridden the default F4 functionality (delete function). Here is how i did it –

Open the sales order form (Form 42) in design mode. Add a new menu item to the menu button ‘Order’ present in that form. Caption it as ‘Dummy’ and assign the shortcut key F4 to it.

Don’t write any code for this menu item. So nothing will happen if somebody clicks on it.
Now if somebody press F4, system calls that menu item ‘Dummy’ instead of default delete call and nothing happens for F4. And your default F4 is disabled.
Do you have a better solution? Do write to me.

Do you want to keep a flow field editable on a form or in a table?

Let’s try it.

Say we will make ‘Balance (LCY)’ field in Customer card editable and test it. In Customer card, the textbox control is already editable and it is inheriting the ‘Editable = No’ property of the field from the customer tables.

Let’s make the ‘Balance (LCY)’ field editable in Customer table.

Select the field > Properties > Editable > Yes

Once this is done, the textbox displaying ‘Balance (LCY)’ in Customer card will become editable and you can put new amount in this field.

Right now, the calculated amount (coming from Detailed Cust. Ledger Entry) is shown as 73,810.00.

Let’s modify it to 80000.00 (an increase of 6,190.00)

So what will happen now. Your customer card is showing a value of 80000.00 whereas your detailed customer ledger entry table have entries of amount 73,810.00 only. is your data customer entries become inconsistent?

Not really. Navision never allows inconsistent data in flow fields. The system will simply will lookout some way to make the data consistent. It simply insert a new entry in ‘Detailed cust. ledger entry’ to adjust the inconsistent data.

Here, look at the detailed cust. ledger entry and you can see a new entry having an amount of 6,190.00. This new entry makes the total 80000.00 (now consistent)

Pretty dangerous! What do you think? To avoid this, you need to keep your flow field always ineditable.

But having seen the above incidence, can you think about any scenario, where this particular feature / rather drawback can be very useful?

Let me know if you find something interesting.

Do things differently

To start our discussion, let’s take a simple topic –

Few months back, in one of Orkut forum somebody had posted a problem as follows:

‘I have to pick out a digit from a code field. E.g. Code is ‘50123AD786′ n I have to select 7th character from this field How can this be done…’

You all know it’s simple and the common way to achieve this is:

Copystr([ur code variable],[position, say 7 for 7th position],[length, here for u its 1])

We have designed a new form here. Taken a new global variable called ‘Name’ of data type Text and inserted a text box to display the variable.

We also have written a single line code as per the above syntax to display the 7th character of the ‘Name’ in a message box.

Now, can we do it in not so common way?

Yes, we can if we know that a text string in Navision is nothing but an array of characters (literally). So here ‘Name’ variable is nothing but an array of its length and we can fetch out the 7th character of it by simply referring it as Name[7]. To validate it, let us change the code in the ‘OnPush’ trigger of the Button as below:

Message (FORMAT (Name [7]));

Why we needed a FORMAT command? Just because the message box can only display text not character.

Here I entered ‘Snehanshu Mandal’ in the text box and clicked on the button ‘Click me’. It’s displaying the 7th character of my name ‘s’.

Don’t you think it’s interesting?

How can we make working on Navision a FUN?

Hi friends! How are you doing?

Last month, I completed 6 ½ years working in Navision and was stumped by one of my junior’s question – Don’t you get bored while working with Navision after so many years? Big question.

People are getting bored very fast nowadays. But why? You get bored when –

1. Work is monotonous
2. Work can be monotonous when you know everything and there is nothing new left to learn
3. ‘Hey, I am doing the same form designing, report designing and data port designing’

Besides the above points, you will find plenty of reasons of why people are getting bored in Navision.

I think the answer lies in the approach you have towards Navision. Whether we are trying to solve a problem too technically or we are having a holistic approach to solve a problem? Again to have a holistic approach towards a problem, you need to be little experienced on Navision or you have a fair idea about Navision functional things. So the whole issue is little paradoxical.
Whatever may be the reason, here we are not to discuss the problem. Rather we are here to try & make working on Navision a little more enjoyable. And to make it enjoyable, the best thing is to do something new in Navision every day. Mind it, you can do something new only when you do not know everything but you know something of Navision to start with.

I am not here to teach you something new in Navision rather together we will search new things in Navision. Every day, we will discuss about one topic and if you feel interested, you are welcome to suggest me the future topic or contribute a new discussion. You are welcome to send the problem you are having in your implementation and together we will try to evolve most reasonable solution of it. When so many brains will work on the problem, definitely we will be able to achieve most suitable solution for the problem
So let’s wish ourselves happy learning of Navision.