Change Editable Property of Page on Condition

postsaurav
Member Posts: 708
Hi all,
I had a simple query, i want to know is it possible in NAV 2009 SP1 to Change Editable Property of Page during Run Time Based on a field.
Example -
If Status is Released of a sales order the Sales Header Form should be Un-EDITABLE but if the status is OPEN the Sales Header should be Editable.
Let me know if there is any way to do it.
I had a simple query, i want to know is it possible in NAV 2009 SP1 to Change Editable Property of Page during Run Time Based on a field.
Example -
If Status is Released of a sales order the Sales Header Form should be Un-EDITABLE but if the status is OPEN the Sales Header should be Editable.
Let me know if there is any way to do it.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page
0
Answers
-
Use CurrPage.EDITABLE(FALSE);
Pass Boolean argument according to your requirement.Jatin Patel
Microsoft Dynamics NAV Consultant
Jatin's Blog0 -
Jatin Patel wrote:Use CurrPage.EDITABLE(FALSE);
Pass Boolean argument according to your requirement.
Have you checked it?0 -
Hi Jatin,
No it dosen't work. I already tried this before posting the post.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
Hi all,
Is there any way that it is possible ?
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
I didnt test this solution perfectly so please test it before implementing.
Create a Global Boolean Variable ex: StatusEditable
Set IncludeInDataset property of variable to Yes
Select Page Tabs ex: General
Set Editable property of tab to StatusEditable
write below code in OnOpenGetRecord trigger of PageStatusEditable := Status = Status::Open;
0 -
Hi
Please try it to handle in following way.
1) assign value of your control value to a Boolean variable
2) set all the page controls' ( Text boxes) Editable property to this Boolean variable
3) use CurrPage.UPDATE on your control variable's OnValidateUday Mer | MS Dynamics NAV Techno-Functional Consultant0 -
mohana_cse06 wrote:I didnt test this solution perfectly so please test it before implementing.
Create a Global Boolean Variable ex: StatusEditable
Set IncludeInDataset property of variable to Yes
Select Page Tabs ex: General
Set Editable property of tab to StatusEditable
write below code in OnOpenGetRecord trigger of PageStatusEditable := Status = Status::Open;
Hi Mohan,
I already tried that but the problem in this solution is that -
If we make tab un-editable only the first tab can be seen other tabs comes as collapsed.
So client will not get agree on same.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
udayrmer wrote:Hi
Please try it to handle in following way.
1) assign value of your control value to a Boolean variable
2) set all the page controls' ( Text boxes) Editable property to this Boolean variable
3) use CurrPage.UPDATE on your control variable's OnValidate
Hi udayrmer,
Is this the only solution?
I know it will work great but as i already added in the post that the form is Sales Header, that means there will be 60 -100 fields in sales header Page. Adding that property on all these fields i don't think that is a appropriate solution.
And what about use will add a new field to the form he had to add the code everytime.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
postsaurav wrote:So client will not get agree on same.postsaurav wrote:I know it will work great but as i already added in the post that the form is Sales Header, that means there will be 60 -100 fields in sales header Page. Adding that property on all these fields i don't think that is a appropriate solution.
And what about use will add a new field to the form he had to add the code everytime.
You or your client have to adjust some where..0 -
postsaurav wrote:Hi Mohan,
I already tried that but the problem in this solution is that -
If we make tab un-editable only the first tab can be seen other tabs comes as collapsed.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