Login / Register  search  syndication

          Jason Buss' Blog

Jason Buss on SalesLogix development & customization, SQL, and more.

Type/Subtype issue in SLX Web 7.5.1

Before I get back to Sage CRM topics, I wanted to mention an issue I bumped into an issue in a couple of SLX 7.5.1 databases.

Account Type/Subtype combination are generally pretty easy to set up.  You just need to create a picklist and name it using the "Code" value for an item in the Account Type Picklist. (For "Lead" for example, create a picklist named "Account Lead" for example).  This works fine in most cases, however I discovered that on the insert contact/account screen, it doesn't quite work correctly.

When you select a type value on this screen, the correct subtype does not come up.  If you change type to a different value at that point, you'll get the sub type list from the first item you selected.  Account Type and Subtype show up in three areas; Account Detail, Insert Account and Insert Contact Account.  For all three, a business rule called "GetSubTypePickListName()" is called on the LoadAction of the form.  This works fine in Account Detail and Insert Account, but not on Insert Contact/Account.  To fix this on this view, I wanted to move that business rule from the load action of the form to the ChangedValue action of the Type Picklist itself.

This would be easy to do on the first two forms if it were necessary, since you have an actual view in Application Architect to work with.  On the Insert Contact/Account view, you have to modify code within the smart part itself so it gets a little more complicated.

 

First of all, we need to find the smartpart.  This can be found in the Project Explorer under Portal Manager-> Sage SalesLogix-> SupportFiles-> Pages.  Right-Click Insert Contact/Account in this area, and click "Edit Page".

Once the code is open, we basically need to make three changes:

  1. In the OnLoad method, comment out or remove the line that reads pklAccountSubType.PickListName = account.GetSubTypePickListName();
  2. In the OnWireEventHandlers method, we need to add a line to include a change action event to the Type picklist control. I threw in a line pklAccountType.PickListValueChanged += pklAccountType_ChangeAction(); under the first line in that method that reads base.OnWireEventHandlers();
  3. Finally, we need to create the new method we've referenced in Step 2.  I basically took the code from the OnLoad event, and stripped out everything except the reference to the business rule, and code to set up the Entity objects within that method:
    protected void pklAccountType_ChangeAction(object sender, EventArgs e)
    {
        IContact contact = (BindingSource.Current as IContact);
        IAccount account;
       
        if (contact != null)
        {
            if (!Page.IsPostBack)
            {
                contact.Account = account;
            }
            else
            {
                account = contact.Account;
            }
            if (account != null)
            {
                pklAccountSubType.PickListName = account.GetSubTypePickListName();
            }
        }
    }
 

That should be it.  Please note, however; that the code I listed above may require some tweaking.  (The DB I originally modified is not currently available to me, and I put the code example here largely from memory.  I thought I had run into an issue when defining the Account Entity object, so I'll update this post with the final code once I get a chance to double check what I had originally done.)

 

Thanks!  I hope you find this post helpful.  Smile

What's This?
Bookmark and Share

About Jason Buss

   Jason is a senior application developer with Customer FX.


Related Content
   Launching a report from a button in the SalesLogix web client
Starting in SalesLogix 7.5.1, Sage released an undocumented Reporting enhancement that allowed for intera
Posted on Mar 12, 2010 by Kris Halsrud to Kris Halsrud's Blog
 
   Hiding Opportunities in the SalesLogix web client
Occasionally we have clients who do not use the Opportunity components of the SalesLogix web client. 
Posted on Mar 10, 2010 by Kris Halsrud to Kris Halsrud's Blog
 
   Searching for Matching Records in the SalesLogix Web Client
In this short video the user will learn how to search for matching records while adding new records to th
Posted on Mar 10, 2010 by Dale Richter to Tech Talk
 
   Opening Several Records in the SalesLogix Web Client
This webinar will show the user how to open several records at one time. Often you would like to be able
Posted on Mar 10, 2010 by Dale Richter to SalesLogix Training
 
   Creating Ad-Hoc Groups in the SalesLogix Web Client
This webinar will show the user how to create Ad-Hoc Groups in the SalesLogix Web Client. This specific f
Posted on Mar 10, 2010 by Dale Richter to SalesLogix Training
 
Comments

No Comments

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2010 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