Rename Error on Form

jigneshdhandha
Member Posts: 41
Hii Everyone
I am getting record from table on Form and after That I mark record based on condition
I am not Rename or Modify any record I am just getting record But
When i Close Form I got the message "Do you want to rename the record ?"
Please Help me...
Thank you....
I am getting record from table on Form and after That I mark record based on condition
I am not Rename or Modify any record I am just getting record But
When i Close Form I got the message "Do you want to rename the record ?"
Please Help me...
Thank you....
0
Comments
-
Can you show us the code and where did you write?0
-
I am getting record from current table and marking record on base on condition
I am also getting marking record but when i close form that time Error Msg "Do you want to rename the record" ?
I am also Set Property InsertAllowed,ModifyAllowed,DeleteAllowed to No still there is message
Error - "Data Can not be modified on this form"
Code :
MARKEDONLY(FALSE);
SETRANGE("Test 1",Test."Test 1");
SETRANGE("Test 2","Test."Test 2");
SETRANGE("Test 3","Test."Test 3");
SETRANGE("Test 4","Test."Test 4");
IF FINDSET(FALSE,FALSE) THEN BEGIN
REPEAT
MARK(TRUE);
UNTIL NEXT = 0;
END;
SETRANGE("Test 1");
SETRANGE("Test 2");
SETRANGE("Test 3");
SETRANGE("Test 4");0 -
What is your goal?
Did you try to use recordvariable instead of using Rec.
Like
<SalesHeader>.SETRANGE("Test 1",Test."Test 1");0 -
Hi
Getting the same error as original poster. We need to check a running total when entering recipes into a Bill of Material. To do this, in Form 99000786 Production BOM, I've added a control 'Check Total Quantity' to the 'Functions' button, coded as follows:<Control1000000004> - OnPush() CurrForm.ProdBOMLine.FORM.CalcTotalQty;
And in the Form 99000788 Production BOM Lines I've added the following:CalcTotalQty() FINDSET(FALSE,FALSE); REPEAT TotalQuantity := TotalQuantity + Quantity; UNTIL Rec.NEXT = 0; MESSAGE(Text001 + '%1' + '.', TotalQuantity); CLEAR(TotalQuantity);
Gives me exactly what I need except that before the total quantity is shown in the message, I'm asked to confirm if I want to rename the record.
I've run debugger with breakpoints on triggers and it shows no reference to any attempt to rename the record.
Probably a schoolboy error, but I can't see it, so would appreciate a steer in the right direction.
Thanks0 -
My suggestion is to add "CurrForm.UPDATE(FALSE)" at the end of your routine. I believe that you are moving the file pointer of the record set of the current form by traversing the table data via code. This is unexpected behavior. After the above command executes, the pointer on your form should be placed on the last record read in your code. If this is not desired, retrieve the record that you want the form to point to (ex. FINDFIRST) before executing the above UPDATE command.0
-
MikeyD wrote:Hi
Getting the same error as original poster. We need to check a running total when entering recipes into a Bill of Material. To do this, in Form 99000786 Production BOM, I've added a control 'Check Total Quantity' to the 'Functions' button, coded as follows:<Control1000000004> - OnPush() CurrForm.ProdBOMLine.FORM.CalcTotalQty;
And in the Form 99000788 Production BOM Lines I've added the following:CalcTotalQty() FINDSET(FALSE,FALSE); REPEAT TotalQuantity := TotalQuantity + Quantity; UNTIL Rec.NEXT = 0; MESSAGE(Text001 + '%1' + '.', TotalQuantity); CLEAR(TotalQuantity);
Gives me exactly what I need except that before the total quantity is shown in the message, I'm asked to confirm if I want to rename the record.
I've run debugger with breakpoints on triggers and it shows no reference to any attempt to rename the record.
Probably a schoolboy error, but I can't see it, so would appreciate a steer in the right direction.
Thanks
Don't work with Rec on a form. Make a copy of Rec in another variable and use that to do your calculations.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