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
0