Modifying PrimaryKey

clemboclembo Member Posts: 122
I have a table with only two fields (Field1 and Field2). Both fields are part of primary Key. When i try to modify one of these fields system shows an error because cannot find the record to modify.
This is the code:

recRelation.SETFILTER("Field1",'%1',lrecDoc."Nr.");
IF recRelation.FIND('-') THEN
REPEAT
recRelation."Field1" := lrecoDocRec."Nr.";
recRelation.MODIFY; // Here it's breaks code execution and shows an error
UNTIL recRelation.NEXT = 0;

How I solve this problem? :cry:

Comments

Sign In or Register to comment.