CurrPage.EDITABLE together with CurrPage.UPDATE

FragenFrager
Member Posts: 66
Hello,
we have made the following adjustments to the P41 for some customers; When an offer is moved from the Released status to the Open status, it should be editable. Basically, it works, BUT, you first have to leave the offer completely and then open it again so that the fields are no longer disabled.
I've tried putting a CurrPage.UPDATE in a number of places, but either the page keeps calling itself again, or nothing happens at all.
Can't the editability of a page be controlled via CurrPage.UPDATE? Otherwise, is there another way to grant editability without reloading the page?
With kind regards
we have made the following adjustments to the P41 for some customers; When an offer is moved from the Released status to the Open status, it should be editable. Basically, it works, BUT, you first have to leave the offer completely and then open it again so that the fields are no longer disabled.
I've tried putting a CurrPage.UPDATE in a number of places, but either the page keeps calling itself again, or nothing happens at all.
Can't the editability of a page be controlled via CurrPage.UPDATE? Otherwise, is there another way to grant editability without reloading the page?
With kind regards
0
Answers
-
I have suggestion. May be you can try to create a duplicate of the current record, clear the original record, and then modify it. By doing so, the record will be refreshed, allowing the fields to become editable. This eliminates the need for users to leave and reopen the offer.
NewRec := Rec.COPY;
CLEAR(Rec);
MODIFY;
I hope this helps0 -
Hello Explore,
thanks for your answer. However, I have a question to that; Isn't it necessary to move the content from NewRec to Rec, again?0 -
Yes0
-
Or you can control the editability of fields on a page without reloading it by using the "Editable" property and the "CurrPage.UPDATE" function.
- Open the Page Designer for your P41 page.
- Locate the fields that need to be editable based on the offer status.
- Set the "Editable" property of these fields to a Boolean variable (e.g., "IsEditable").
- In the code behind the page, create a function (e.g., "UpdateFieldEditableStatus") that determines the value of "IsEditable" based on the offer status. This function should be called whenever the offer status changes.
- Within the function, update the value of "IsEditable" based on the offer status. For example, if the offer status is "Released," set "IsEditable" to "FALSE", and if the offer status is "Open," set "IsEditable" to "TRUE".
- After updating "IsEditable", call "CurrPage.UPDATE(FALSE)" to refresh the page and apply the changes to the field's editability.
VAR IsEditable: Boolean; PROCEDURE UpdateFieldEditableStatus(); BEGIN // Check the offer status and update IsEditable accordingly IF "Offer".Status = "Offer".Status::Released THEN IsEditable := FALSE; ELSE IsEditable := TRUE; CurrPage.UPDATE(FALSE); END;
0 -
Hello Explore,
I'm very sorry to react to your post that late. I will give it a try as soon as possible. Thank you very much for your efforts.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