mibuso.com

Microsoft Business Solutions online community
It is currently Wed Sep 03, 2014 6:42 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [Solved] Change Editable Property of Page on Condition
PostPosted: Sat Jun 30, 2012 9:54 am 
Offline

Joined: Mon Jul 12, 2010 2:47 pm
Posts: 350
Location: Noida
Country: India (in)
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.

_________________
Thanks & Regards,
Saurav Dhyani

http://saurav-nav.blogspot.in


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Sat Jun 30, 2012 1:27 pm 
Offline

Joined: Fri Jun 11, 2010 7:45 am
Posts: 148
Location: Ahmedabad,Gujarat
Country: India (in)
Use CurrPage.EDITABLE(FALSE);

Pass Boolean argument according to your requirement.

_________________
Jatin Patel
Microsoft Dynamics NAV Consultant
MindQuad Solutions Pvt. Ltd.


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Sat Jun 30, 2012 2:41 pm 
Offline

Joined: Mon May 18, 2009 6:36 am
Posts: 824
Location: India
Country: India (in)
Jatin Patel wrote:
Use CurrPage.EDITABLE(FALSE);

Pass Boolean argument according to your requirement.


Have you checked it?

_________________
Vijay Gupta
Changing the code is last step. Try to change processes first...


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Sat Jun 30, 2012 4:29 pm 
Offline

Joined: Mon Jul 12, 2010 2:47 pm
Posts: 350
Location: Noida
Country: India (in)
Hi Jatin,

No it dosen't work. I already tried this before posting the post.

_________________
Thanks & Regards,
Saurav Dhyani

http://saurav-nav.blogspot.in


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Tue Jul 03, 2012 7:08 am 
Offline

Joined: Mon Jul 12, 2010 2:47 pm
Posts: 350
Location: Noida
Country: India (in)
Hi all,

Is there any way that it is possible ?

_________________
Thanks & Regards,
Saurav Dhyani

http://saurav-nav.blogspot.in


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Tue Jul 03, 2012 7:22 am 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4592
Location: Hyderabad
Country: India (in)
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 Page

Code: Select all
StatusEditable := Status = Status::Open;

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav


Top
 Profile  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Tue Jul 03, 2012 7:26 am 
Offline

Joined: Sat Aug 08, 2009 6:28 am
Posts: 162
Location: gujarat
Country: India (in)
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

_________________
Uday Mer | MS Dynamics NAV Techno-Functional Consultant


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Wed Jul 04, 2012 1:13 pm 
Offline

Joined: Mon Jul 12, 2010 2:47 pm
Posts: 350
Location: Noida
Country: India (in)
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 Page

Code: Select all
StatusEditable := 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

http://saurav-nav.blogspot.in


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Wed Jul 04, 2012 1:16 pm 
Offline

Joined: Mon Jul 12, 2010 2:47 pm
Posts: 350
Location: Noida
Country: India (in)
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

http://saurav-nav.blogspot.in


Top
 Profile E-mail  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Wed Jul 04, 2012 1:20 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4592
Location: Hyderabad
Country: India (in)
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..

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav


Top
 Profile  
 
 Post subject: Re: Change Editable Property of Page on Condition
PostPosted: Wed Jul 04, 2012 1:26 pm 
Offline
MVP Microsoft Dynamics NAV

Joined: Tue Sep 02, 2008 8:37 am
Posts: 4592
Location: Hyderabad
Country: India (in)
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.

I tried it again and the Invoicing and shipping tabs are not collapsed :-k

_________________
-Mohana
http://mibuso.com/blogs/mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: