How to Change Customer Card Page in Runtime

ravishah
Member Posts: 13
Hi All
I want to Put the Customer Card Page Editable as the User Rights. I Put the Editable "False" on the OnOpen Trigger of the Page.
Then I Create the Menu Button and After Press the Menu Button System Check Whether User has Permission or Not, If the User has Permission the Page Will be in Editable Mode Otherwise display the Error. I Made this Functionality for Classic Customer Card Form It's Working Fine bur in RTC It's not Working...Please Help me..
I want to Put the Customer Card Page Editable as the User Rights. I Put the Editable "False" on the OnOpen Trigger of the Page.
Then I Create the Menu Button and After Press the Menu Button System Check Whether User has Permission or Not, If the User has Permission the Page Will be in Editable Mode Otherwise display the Error. I Made this Functionality for Classic Customer Card Form It's Working Fine bur in RTC It's not Working...Please Help me..
0
Comments
-
Welcome to Mibuso
Did you try by transforming the form using transformation tool or manually transforming?
can you show us the logic and code written in page?0 -
You can't change the Editable and the Visible Property on the fly while the page is running you can only set them up at the start (OnOpenPage).
Maybe it's a solution for you to set the editable property based on the user setup while opening the page.
EDIT: sorry i thought about it again, this is wrong! this only applies to the visible property!
If you use a boolean variable with InDataSet = True and set that boolean on an action to True then your field will be enabled on the fly0 -
I think you cannot control the Editable property of the page from code after the OnOpenPager trigger is run.
This might be because that conflicts with the RunFormMode settings of the page.
However you can instead (as said in the previous post) control the Editable property of the various FastTabs or individual fields.Thomas Martin
NAV Developer0 -
No..it is possible to contrl the editable property..
check contact card and change the Type to person to company and company to person..you will get an idea..0 -
Yeah..I am talking about the fields editable property only..
As I mentioned above..in contact card..if you selct Type= Person...Company No. field editable is set to true at run time..
If you select type = company...company no. is editable is set to false..0 -
yeah, but TS is talking about the entire page...0
-
Then the alrenate solution is make a boolean in Usersetup and write the code in OnOpenForm
IF UserSetup.GET(USERID) THEN CurrForm.EDITABLE := UserSetup."User May Change Customer";
rather than creating a menu button..0 -
and to think that by only editing the permissions on the customer table of those users the same can be achieved.0
-
Thank You so much to all for your Suggestion....
Actually I want to Editable Whole page during Runtime...I Write Code "Currpage.EDITABLE := FALSE;" on onopen Trigger..and after that I write Code on OnAction Trigger of my Menu Button For User Right....This Functionality Works Perfect in Classic and I also try to Transform the Form through Transformation Tool but Atfet Transform the RTC page is not Working...0 -
Can any one please explain me the meaning of "on the fly"0
-
on the fly means in that context: at runtime. not when developing/changing the page.
that issue is solved by declaring a global variable e.g. PageEditable (type boolean). Set that variable as value to Page property Editable (or visible). that variable can be changed during runtime. so write needed code into page trigger onopenpage, e.g. PageEditable := User.HasTheRightToEdit, where HasTheRightToEdit is a new field in table user.
Also possible: work with page property permission or change the permission sets for that issue.
follow https://msdynamicsnavashwinitripathi.wordpress.com/2015/08/05/accessbypermission-property-in-navision-2015/
best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/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