Most of you have seen and used Dynamics NAV GET Function when you do the coding. Today I am going to show you how to use Dynamics NAV GET Function in your developments. First you need to understand what is this Dynamics NAV GET Function does and what kind of parameters that you need to pass to obtain the expected output.
First will have look how the function how it looks like,
[Ok :=] Record.GET([Value] ,…)
Dynamics NAV GET Function will return a boolean. You need to have a understand about the relevant tables primary key. This GET function works with the primary key. You need to pass the primary key values then you can take or read the item table.
For example, We will create Item records type variable and try to use the function .
This statement causes a run-time error if customer 5402 cannot be found.
You need to avoid this kind of run time errors. You can follow simple error handling technique. Use IF condition with Dynamics NAV GET function to over come run time error.
Now we will have a look same code with IF condition.
IF CustomerRec.GET(‘5402’) THEN
MESSAGE(‘Customer has found’)
MESSAGE(‘Customer does not exist’);
Hope you have learn some basic development technique. Keep in touch with www.navsupports.com