Navision error (10500): RECORDREF variable not initialized

anandfssfss
Member Posts: 10
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, Vendor(i can able to modify records).
I followed all steps. Added the code in the codeunit of 6824.
Even i declared that table in the case statement. Below is my function to modify the record.
case statement..
DATABASE::"New Activity updation":
ReturnCode := ModifyActivity(XMLDocInHead,GUID,AdditionalValues,HeadRecordRef,xHeadRecordRef);
ModifyActivity()....function
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);
Still i am facing the same problem. If i missed anything or any ideas abt welcome.
Thanks in advance ,
regards
Anand
While modify records through Employee portal i am getting "Navision error (10500): RECORDREF variable not initialized" message.
But same its working in customer card, Vendor(i can able to modify records).
I followed all steps. Added the code in the codeunit of 6824.
Even i declared that table in the case statement. Below is my function to modify the record.
case statement..
DATABASE::"New Activity updation":
ReturnCode := ModifyActivity(XMLDocInHead,GUID,AdditionalValues,HeadRecordRef,xHeadRecordRef);
ModifyActivity()....function
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);
Still i am facing the same problem. If i missed anything or any ideas abt welcome.
Thanks in advance ,
regards
Anand
0
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