Error while Calling a Function

navuser1
Member Posts: 1,334
Hi all,
I am facing a error message at time of calling a Function. ](*,)
Function Name = GetNeededQty;
Parameters = ProdOrderComp ( Record = Prod. Order Component )
Error Screen msg :
Custom Function :
What is the reason ? Kindly reply. [-o<
I am facing a error message at time of calling a Function. ](*,)
Function Name = GetNeededQty;
Parameters = ProdOrderComp ( Record = Prod. Order Component )
Error Screen msg :
Custom Function :
What is the reason ? Kindly reply. [-o<
Now or Never
0
Answers
-
Do you have a field or variable with the same name as the record?0
-
kapamarou wrote:Do you have a field or variable with the same name as the record?
No.
I have created this Function in the Report named Prod. Order - Job Card (ID 99000762).
And Calling this function in the Prod. Order Component - OnAfterGetRecord().
Now or Never0 -
I saw the call to the function. Try the following:
Rename the DataItem variable on your report as RecA (or something...)
If you leave the call exactly as is do you get an error that "Prod. Order Component" is not declared?0 -
kapamarou wrote:I saw the call to the function. Try the following:
Rename the DataItem variable on your report as RecA (or something...)
If you leave the call exactly as is do you get an error that "Prod. Order Component" is not declared?
Error is As it wasNow or Never0 -
Yes... I saw all that.
If this error occurs in the call to GetNeededQty then it seems that for some reason the caller passes an Option as a parameter, and not a Record.
So my initial question was:
Is there a possibility that there is a field on "Prod. Order Component" table with the name
"Prod. Order Component"? Is there a local or global variable with the name "Prod. Order Component"?0 -
kapamarou wrote:Yes... I saw all that.
If this error occurs in the call to GetNeededQty then it seems that for some reason the caller passes an Option as a parameter, and not a Record.
So my initial question was:
Is there a possibility that there is a field on "Prod. Order Component" table with the name
I'm working in Nav 5.0 Sp1 and no field is there with the same name.kapamarou wrote:"Prod. Order Component"? Is there a local or global variable with the name "Prod. Order Component"?
This is the Last dataitem of the Report and there is a parameter named ProdOrderComp ( Record = "Prod. Order Component" ) of the function.
The Function is Called everywhere without throwing any compiling error but not in the Prod. Order Component - OnAfterGetRecord().
:-k :-k :-kNow or Never0 -
kapamarou wrote:The Function is Called everywhere without throwing any compiling error but not in the Prod. Order Component - OnAfterGetRecord().
This is crucial info.
Could there be a GetNeededQty function with (different parameter) on the "Prod. Order Component" table?0 -
kapamarou wrote:kapamarou wrote:The Function is Called everywhere without throwing any compiling error but not in the Prod. Order Component - OnAfterGetRecord().
This is crucial info.
Could there be a GetNeededQty function with (different parameter) on the "Prod. Order Component" table?
Yes kapamarou. I have found the same before YOU
Thanks for your support. :thumbsup:
Merry Christmas & Happy New Year to all of you.Now or Never0 -
You're welcome.
Merry Christmas0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions