Navision error (10500): RECORDREF variable not initialized.

naimish_hit
Member Posts: 111
Hi
What does this error mean and how to solve it ?
Navision error (10500): RECORDREF variable not initialized.
Regards,
Naimish Dave
What does this error mean and how to solve it ?
Navision error (10500): RECORDREF variable not initialized.
Regards,
Naimish Dave
Naimish Dave
(Software Engineer)
(Software Engineer)
0
Comments
-
Somewhere in the program, the code uses a recordref-variable, but the program didn't initialise it. You can do that with for example MyRecordRef.OPEN(...) or MyRecordRef.GETTABLE(...) or MyRecordRef.DUPLICATE.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi,
I am developing card web part, This wp is used to add new records in Employee Table (T5200).
I have placed some of fields on my wp and created actions for Create New, Save, Delete etc.
Now after filling all the fileds on my wp I am clicking on Create New button and receing Navision error (10500): RECORDREF variable not initialized. error.
I am using Navision 4.0 SP1 with Cronus database.
Now here how I can implement your suggestion ?
NaimishNaimish Dave
(Software Engineer)0 -
naimish_hit wrote:Hi,
I am developing card web part, This wp is used to add new records in Employee Table (T5200).
I have placed some of fields on my wp and created actions for Create New, Save, Delete etc.
Now after filling all the fileds on my wp I am clicking on Create New button and receing Navision error (10500): RECORDREF variable not initialized. error.
I am using Navision 4.0 SP1 with Cronus database.
Now here how I can implement your suggestion ?
NaimishRegards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi,
Do you know what is the use of EP Temporary Filter?
I have observed that Codeunit 6822 is inserting some data in this table, where does this table is used ?
BTW Recordref error has been solved.
Regards,
NaimishNaimish Dave
(Software Engineer)0 -
Sorry, I don't know.
I think you better create another post for this, because it is a completely different problem.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi,
as already noted somewhere else here in this forum again:
Whenever you want to
- INSERT
- MODIFY
- DELETE
ANY DATA FROM EP IN NAV
then you have to add code in the following Codeunits:
6822 EP Insert Head Data Mgt.
6823 EP Insert Line Data Mgt.
6824 EP Modify Head Data Mgt.
6825 EP Modify Line Data Mgt.
6826 EP Delete Head Data Mgt.
6827 EP Delete Line Data Mgt.
FIRST: Add your custom table to the CASE TableNo OF right in the first codeunit.
Then you have to create a new function which will then do the modification.
Why you have to do this?
Because:
a.) Primary Keys on insert actions
Here you can decide how the primary key has to be generated. Sometimes it works with a simple INIT, but like in the SalesLine you have to calculate the next Line No!
b.) Modify and record ref
RecordRef do not call any CAL code beyond xRec comparissons (e.g. have a look in Customer table and the call to UpdateContFromCust)
Therefore sometimes you have to call the code from inside this modification.
HTH,
Rainer0 -
Hi there,
Could you help me with this error? I'm trying to create a new employee in the table Employees of Cronus database... Am i get always the same error!
I saw your post's and i dind't understood where do you use the code :
"Somewhere in the program, the code uses a recordref-variable, but the program didn't initialise it. You can do that with for example MyRecordRef.OPEN(...) or MyRecordRef.GETTABLE(...) or MyRecordRef.DUPLICATE."
I'm new using the Employee Portal, i started 4 days ago...!
Could you help me?
Best Regards,
Afonso Correia0 -
Kalimeruh wrote:"Somewhere in the program, the code uses a recordref-variable, but the program didn't initialise it. You can do that with for example MyRecordRef.OPEN(...) or MyRecordRef.GETTABLE(...) or MyRecordRef.DUPLICATE."
It means you are using a recordreference with SETRANGE, VALIDATE,....
But first you have to initialise it with OPEN.
It is the same as with an automation.
With automation you have to CREATE the variable before using it. Recordreference uses OPEN.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi there,
I get an error accessing database when i'm using table Employee Absence.
I can create and insert a new Entry No. with IEP Insert Head Data Mgt., but when i use EP Modify Head Data Mgt. to save or modify the other data it says that there is another user accessing the database. what should i do?
the code is here :
ReturnCode := 0;
FilterString :=
STRSUBSTNO('WHERE(1=CONST(%1))',
DecodeXML.GetValueByFieldIDFromHeadData(XMLDocInHead,EmployeeAbsence.FIELDNO("Entry No.")));
HeadRecordRef.OPEN(DATABASE::"Employee Absence",FALSE);
HeadRecordRef.SETVIEW(FilterString);
xHeadRecordRef.OPEN(DATABASE::"Employee Absence",FALSE);
xHeadRecordRef.SETVIEW(FilterString);
IF xHeadRecordRef.FIND('-') THEN;
IF SupportFunctions.CompareHashValues(DecodeXML.GetHashValue(XMLDocInHead),HeadRecordRef) THEN BEGIN
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("Entry No."));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("Employee No."));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("From Date"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("To Date"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("Cause of Absence Code"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO(Description));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO(Quantity));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,EmployeeAbsence.FIELDNO("Unit of Measure Code"));
DecodeXML.ModifyRecord(XMLDocInHead,HeadRecordRef,XMLDocValField,DATABASE::"Employee Absence",
TRUE,FALSE,AdditionalValues[1],AdditionalValues[2]);
HeadRecordRef.MODIFY(TRUE);
END ELSE BEGIN
ReturnCode := 20;
END;
HeadFieldRef := HeadRecordRef.FIELD(EmployeeAbsence.FIELDNO("Entry No."));
tmpOption := HeadFieldRef.VALUE;
tmptext := FormatFunctions.OptionToText(tmpOption);
SupportFunctions.CreateTempHeadFilterTable(EmployeeAbsence.FIELDNO("Entry No."),tmptext,GUID);
SupportFunctions.CreateTempHeadFilterKeys(EmployeeAbsence.FIELDNO("Entry No."),GUID);
Best Regards,
Afonso Correia.
Sorry for my English0 -
Hi all,
While modify records through Employee portal i am getting "Navision error (10500): RECORDREF variable not initialized" message.
](*,)
But same its working in customer card(i can able to modify records).
Even i declared that table in the case statement. Below is my function to modify the record.
ReturnCode := 0;
FilterString :=
STRSUBSTNO('WHERE(1=CONST(%1))',
DecodeXML.GetValueByFieldIDFromHeadData(XMLDocInHead,"New Activity updation".FIELDNO("SegmentNo.")));
HeadRecordRef.OPEN(DATABASE::"New Activity updation",FALSE);
HeadRecordRef.SETVIEW(FilterString);
xHeadRecordRef.OPEN(DATABASE::"New Activity updation",FALSE);
xHeadRecordRef.SETVIEW(FilterString);
IF xHeadRecordRef.FIND('-') THEN;
IF SupportFunctions.CompareHashValues(DecodeXML.GetHashValue(XMLDocInHead),HeadRecordRef) THEN BEGIN
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Salesperson Code"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Report Date"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Salesperson Code"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Working City"));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Employee No."));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,"New Activity updation".FIELDNO("Contact No."));
DecodeXML.ModifyRecord(XMLDocInHead,HeadRecordRef,XMLDocValField,DATABASE::"New Activity updation",
TRUE,FALSE,AdditionalValues[1],AdditionalValues[2]);
HeadRecordRef.MODIFY(TRUE);
END ELSE BEGIN
ReturnCode := 20;
END;
HeadFieldRef := HeadRecordRef.FIELD("New Activity updation".FIELDNO("SegmentNo."));
tmpValue := HeadFieldRef.VALUE;
SupportFunctions.CreateTempHeadFilterTable("New Activity updation".FIELDNO("SegmentNo."),tmpValue,GUID);
SupportFunctions.CreateTempHeadFilterKeys("New Activity updation".FIELDNO("SegmentNo."),GUID);
What to do afterthat?
Thanks in advance ,
regards
Anand0 -
I've the same problem....any idea?0
-
Hi,
this can not be answered by just one hint, because there are many possible areas where the error can occur.
Therefore please use the search in the forums to find my How To run a client as NAS and activate the debugger. Then you should be able to easily track down the error.
Please post your
- Current Code
- and if succesful your solution
in the forum so that other can learn from it.
Thanks.
KR
Rainer0 -
Hello IHateLinux,
i can not find your posto you have wrote. Can you post a link of that, please.
I have serious problems with modify table 83 - Item Journal Line.
please, help me.
thank you,
Best regards,
Slavisa0
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