The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Using FormWrapper class to set Account Tab form to Read-Only
Posted: 18 Oct 07 3:46 PM
|
I have a custom account tab that we use in both the Sales and the support client. Currently, we have two separate versions of this tab. The SalesLogix client tab is updateable whereas the support tab is read-only. I am making some updates to the tabs for a project and decided rather than maintaining two separate tabs it would be nice to only have to maintain one. So, I tried to put the FormWrapper class coding in the OnOpen event of the tab. The tab remains updateable in both clients. I have moved the code to the OnChange of the form and I get the same results. I have used this code before for add/edit screens and it works great. I am sure that I am missing something rather simple but cannot figure it out.
Here is my current code (I have tried to change it different ways and receive the same results).
dim frm
if Application.Name = "Support" then set frm = New FormWrapper frm.Form = "frmInstall" frm.Readonly = true else frm.ReadOnly = false end if
I have not tried putting this code on the Account Detail screen. Is that where I would need to put it? All of our support tabs are read-only and a majority of them currently have two versions (one for the support client use and one for use in the Sales client). If we could get this working it would save a lot of time on maintenance.
|
|
|
|
Re: Using FormWrapper class to set Account Tab form to Read-Only
Posted: 18 Oct 07 4:10 PM
|
First of all, whether this will even work in the support client - no idea. I don't work in the support client ever so I can't say if it will work or not.
Second, don't pass the form name as a string.
Change it from this:
frm.Form = "frmInstall"
to this:
frm.Form = frmInstall
Notice no quotes. |
|
|
|
Re: Using FormWrapper class to set Account Tab form to Read-Only
Posted: 19 Oct 07 7:36 AM
|
When I do this, the radio buttons and checkboxes get disabled but all of the lookup edits, datetime edits, picklist, and memo fields are still not disabled or read-only. Does this mean that what I am trying to do cannot be done in support? At least we're heading in the right direction! |
|
|
| |
|
Re: Using FormWrapper class to set Account Tab form to Read-Only
Posted: 29 Oct 07 3:14 PM
|
This is just a shot in the dark - I haven't touched the Support client in years and it is actually no longer available in the 7.x system I have on our server. But you might want to look at the TypeName - my hunch is that the support form has different names for those controls. So if you figure those out the code should work for you. No promises, justa sugestion.
Since I am suggesting things - have you looked at taking people off of the support client and doing everything with the one client? This might solve a lot of other headaches for you.
Ted |
|
|
|
Re: Using FormWrapper class to set Account Tab form to Read-Only
Posted: 29 Oct 07 3:22 PM
|
Thanks Ted, I will look into it. The only thing is that this form isn't a support, legacy form. It is just a form, written in 6 code for Sales that also works as an account tab in the support client.
Anyhoo....we had planned on doing the 7.2 upgrade this next year. We would like to move all of our support users over to the web client at once. Then migrate the sales users over to the web version at a different date as we have over 300 employees. However, due to budgeting for next year, I believe this project was moved out another year!!! YUCK...not very thrilled about it, but I'm not sure there is much I can do at this time. Thanks for the suggestions... |
|
|
| |
|