Login / Register  search  syndication  about

          Ryan Farley's Blog

Ryan Farley on .NET Development with a focus on CRM Development for SalesLogix

Setting Read-Only on Legacy Views

Not too long ago I wrote an article on generically setting a Form as read-only on slxdeveloper.com. Mike Spragg from E1 Business shared a great approach with me to accomplish the same with legacy views.

What Mike does is run a script that establishes all the objects on the form - and then set them to disabled. That way, you retain the cut/paste info & linkedit's (urls' etc):

Dim ObjectName As String
Dim enabled As Boolean
Dim t As Integer

Dim IDList As String
Dim IDExclude As String

    enabled = False

    IDList = CurrentObjectChildrenNames
    IDExclude = "Panel4btMatchBevelPanel1Panel2Panel3Panel4PanelimLockButton"

    For t = 0 To GetLineCount(IDList) - 1
        Objectname = GetNthLine(IDList, t)
        If instr(1, IDExclude, ObjectName) <= 0 Then
            SetPropertyOf ObjectName, "Enabled", enabled
        End If
    Next t

This is, obviously, legacy - but same idea for active forms

IDList = list of all objects on the form
IDExclude = Any you don't want to protect

That is an awesome approach. Thanks Mike! For anyone still working with legacy (I feel for you) this is a great way to accomplish this.

What's This?
  
Bookmark and Share

About Ryan Farley

   Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

View the SalesLogix Mobile Seveloper Series
View the SalesLogix SData Developer Series
View the Git for the SalesLogix Developer series



Related Content
   Confirming Actions With an "Are you sure?" Prompt in Infor CRM (Saleslogix)
I'm not a huge fan of bugging end users. I figure, if an end user clicked something, he or she meant
Posted on Nov 18, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Delivering Data & Schema in SalesLogix Bundles
If you've had any exposure to SalesLogix, you'll have used a bundle. Bundles are great, but when
Posted on Apr 24, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Using a Test Plan
So you have approved the Statement of Work (SOW) for some modifications and are awaiting the delivery of
Posted on Mar 13, 2014 by George Jensen to George Jensen's Blog
 
   Creating a Saleslogix Ticket Pretty Prefix and Suffix in External Applications
Some entities in SalesLogix, such as Tickets, use a "pretty key" as an easier to use value to r
Posted on Feb 28, 2014 by Ryan Farley to Ryan Farley's Blog
 
   Evaluating strings in C# Code snippets
When checking for two (or more) different values for a property in a code snippet, you can't simply l
Posted on Dec 13, 2013 by Jason Buss to Jason Buss' Blog
 
Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2014 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register