Employee Poratal : - Navision error (10500):

EknathPPawarEknathPPawar Member Posts: 34
edited 2008-10-15 in Navision e-Commerce
I have created a Card Web Part to save records to a table as below

TableName : DateFilter Details

1. StartDate Datatype - Date
2. Description Code - 50

When i use the insert command the record shown is refreshed. When i use the save command I get the Error Navision error (10500): RECORDREF variable not initialized.

I have made the changes in Code unit - 6822 - EP Insert Head Data Mgt. by copying the InsertCustomer Function and by making the necessary changes.
========= start of code =======
InsertrReportDate(GUID : Text[50];VAR HeadRecordRef : RecordRef)
HeadRecordRef.OPEN(DATABASE::ReportdateFilter,FALSE);
HeadRecordRef.INIT;
HeadRecordRef.INSERT(TRUE);

// Build Records to Create the Filter for Answer (Filter for HEAD)
HeadFieldRef := HeadRecordRef.FIELD(ReportDate.FIELDNO(Description));
tmpCustNo := HeadFieldRef.VALUE;
EPSupportFunctions.CreateTempHeadFilterTable(ReportDate.FIELDNO(Description),tmpCustNo,GUID);

// Build Records to Create the Key for Answer (Filter for HEAD)
EPSupportFunctions.CreateTempHeadFilterKeys(ReportDate.FIELDNO(Description),GUID);

========= END of code =======



Please guide me in this matter.

Regards

Eknath Pawar.

Answers

  • IHateLinuxIHateLinux Member Posts: 223
    Hi,

    there are multiple Codeunits:
      InsertHead which means that this codeunit will be used when you insert a new record through a card or from the head section of a header-line web part
      InsertLine which means that this codeunit will be used when you insert a new record through a list or from the line section of a header-line web part
      ModifyHead which means that this codeunit will be used when you modify a record from card / head area
      ModifyLine which means that this codeunit will be used when you modify a record from list / line area
      DeleteHead which means that this codeunit will be used when you delete a record from card / head area
      DeleteLine which means that this codeunit will be used when you delete a record from list / line area

    Therefore you have also to modify the ModifyHead codeunit for your table. Then the save should work.

    HTH,
    Rainer
  • EknathPPawarEknathPPawar Member Posts: 34
    Dear Rainer,

    I have done the changes in the necessary code units and its works.

    Thanks,


    Regards

    Eknath Pawar.
Sign In or Register to comment.