Employee Portal : Modify Line Issue

vipinkuruvilla
Member Posts: 143
Hai All,
Following is my code for modifying a line in a header-line web part :
ReturnCode := 0;
FilterString :=
STRSUBSTNO('WHERE(1=CONST(%1),3=CONST(%2))',
DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(No)),
DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(LineNo)));
LineRecordRef.OPEN(DATABASE::TomList,FALSE);
LineRecordRef.SETVIEW(FilterString);
xLineRecordRef.OPEN(DATABASE::TomList,FALSE);
xLineRecordRef.SETVIEW(FilterString);
IF xLineRecordRef.FIND('-') THEN;
IF SupportFunctions.CompareHashValues(DecodeXML.GetHashValue(XMLDocInLine),LineRecordRef) THEN BEGIN
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(No));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark1));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark2));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark3));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Total));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Average));
DecodeXML.ModifyRecord(XMLDocInLine,LineRecordRef,XMLDocValField,DATABASE::TomList,
FALSE,TRUE,AdditionalValues[1],AdditionalValues[2]);
LineRecordRef.MODIFY(TRUE);
END ELSE BEGIN
ReturnCode := 20;
END;
LineFieldRef := LineRecordRef.FIELD(TomList.FIELDNO(No));
tmpvalue := LineFieldRef.VALUE;
SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(No),tmpvalue,GUID);
SupportFunctions.CreateTempHeadFilterKeys(TomList.FIELDNO(No),GUID);
Please take a note that TomHeader is my record variable.
Also No,Mark1 and Mark2 are my keys.
Iam getting a error : "Navision error (10500): You cannot enter 'ERROR))' in Integer. The cursor is in front of the invalid character. "
Did anyone come across this error?? Please do advice me....
Thanx in advance...
Following is my code for modifying a line in a header-line web part :
ReturnCode := 0;
FilterString :=
STRSUBSTNO('WHERE(1=CONST(%1),3=CONST(%2))',
DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(No)),
DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(LineNo)));
LineRecordRef.OPEN(DATABASE::TomList,FALSE);
LineRecordRef.SETVIEW(FilterString);
xLineRecordRef.OPEN(DATABASE::TomList,FALSE);
xLineRecordRef.SETVIEW(FilterString);
IF xLineRecordRef.FIND('-') THEN;
IF SupportFunctions.CompareHashValues(DecodeXML.GetHashValue(XMLDocInLine),LineRecordRef) THEN BEGIN
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(No));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark1));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark2));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark3));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Total));
EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Average));
DecodeXML.ModifyRecord(XMLDocInLine,LineRecordRef,XMLDocValField,DATABASE::TomList,
FALSE,TRUE,AdditionalValues[1],AdditionalValues[2]);
LineRecordRef.MODIFY(TRUE);
END ELSE BEGIN
ReturnCode := 20;
END;
LineFieldRef := LineRecordRef.FIELD(TomList.FIELDNO(No));
tmpvalue := LineFieldRef.VALUE;
SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(No),tmpvalue,GUID);
SupportFunctions.CreateTempHeadFilterKeys(TomList.FIELDNO(No),GUID);
Please take a note that TomHeader is my record variable.
Also No,Mark1 and Mark2 are my keys.
Iam getting a error : "Navision error (10500): You cannot enter 'ERROR))' in Integer. The cursor is in front of the invalid character. "
Did anyone come across this error?? Please do advice me....
Thanx in advance...
0
Comments
-
[Topic moved from Navision forum to Navision e-Commerce forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
STRSUBSTNO('WHERE(1=CONST(%1),3=CONST(%2))'
please correct the syntax. your error will get resolve.0 -
That issue is solved........The problem was I didnt declare all my keys to the Line Record Ref variable. But After modifying my code to this :
ReturnCode := 0; FilterString := STRSUBSTNO('WHERE(1=CONST(%1),2=CONST(%2),3=CONST(%3),7=CONST(%4))', DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(No)), DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(Mark1)), DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(Mark2)), DecodeXML.GetValueByFieldIDFromLineData(XMLDocInLine,TomList.FIELDNO(LineNo))); LineRecordRef.OPEN(DATABASE::TomList,FALSE); LineRecordRef.SETVIEW(FilterString); xLineRecordRef.OPEN(DATABASE::TomList,FALSE); xLineRecordRef.SETVIEW(FilterString); IF xLineRecordRef.FIND('-') THEN; IF SupportFunctions.CompareHashValues(DecodeXML.GetHashValue(XMLDocInLine),LineRecordRef) THEN BEGIN EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(No)); EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark1)); EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark2)); EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Mark3)); EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Total)); EncodeXML.AddFieldToValidationDoc(XMLDocValField,TomList.FIELDNO(Average)); DecodeXML.ModifyRecord(XMLDocInLine,LineRecordRef,XMLDocValField,DATABASE::TomList, FALSE,TRUE,AdditionalValues[1],AdditionalValues[2]); LineRecordRef.MODIFY(TRUE); END ELSE BEGIN ReturnCode := 20; END; LineFieldRef := LineRecordRef.FIELD(TomList.FIELDNO(No)); tmpvalue := LineFieldRef.VALUE; SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(No),tmpvalue,GUID); LineFieldRef := LineRecordRef.FIELD(TomList.FIELDNO(Mark1)); tmpvalue := LineFieldRef.VALUE; SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(Mark1),tmpvalue,GUID); LineFieldRef := LineRecordRef.FIELD(TomList.FIELDNO(Mark2)); tmpvalue := LineFieldRef.VALUE; SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(Mark2),tmpvalue,GUID); SupportFunctions.CreateTempHeadFilterTable(TomList.FIELDNO(No),tmpvalue,GUID); SupportFunctions.CreateTempHeadFilterKeys(TomList.FIELDNO(No),GUID);
Here TomList is my record variable . Any my Primary keys are :
1) No,Mark1,Mark2
2) No,LineNo
Iam getting an error like this :
" Navision error (10500): There is not sufficient available space in the C/AL stack memory to execute this task. There are too many simultaneous activities, due to the way recursive function call is used in the program. The problem can be solved temporarily by shutting down some of the open activities (but the function still cannot be executed). "
Can anyone tell me where I have gone wrong ?? Kindly help me out
Thanx in advance.........0 -
Hi, all
I just want to modify or create the Item Journal Lines from Employee Portal.
Can you please suggest me, whether I need any NAVISION Customization or not?
Please, suggest me how to do the same in any case.
Please, help me urgentaly.
Thanks in advance.0 -
Hi all,
I found the solution.
For that we need to make Item Journal Line table as a Card in Employee Portal.
And for modification of journal entries via Sharepoint, we need to write code in the Codeunits related to EP Modify Header, EP Insert Header.
Thanks.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