Login / Register  search  syndication  about

          George Jensen's Blog

George Jensen on Reporting, Business Intelligence, Crystal Reports, Visual Analyzer, and more.

Adding Activities and History to a Custom Main Entity in the Saleslogix Web Client (Part 5)

Today I am sitting in the hospital helping my wonderful wife welcome our fourth child into this world.  Cailyn Elizabeth was born on the 4th of June after 16 hours of labor measuring out at 10lbs and 21 inches.  She is very beautiful and mom and baby are doing great.  This is the second to last post of my effort to provide some easy to follow steps that will help a developer add the ability to associate Activity and History records for a custom main entity within the SalesLogix Web Client.  Read the previous four posts to catch up on where we are at. Part 1 Part 2Part 3, and Part 4

In this post we will add scripts to the two list views that are used in all main entities to display Activity and History records. 

If you have been following along with the earlier posts you hopefully have an idea of the flow of how we are accomplishing this task.  Like we did in the last post, today we are going to just focus on the code and where it goes.  But first, lets create some new definitions for todays code. 

We still need to use EntityName but we will format the characters a little differently today.  The first letter will be uppercase and all remaining letters will be lowercase.  This is mandated by some existing code with the script we are working on.  "EntityName" now looks like "Entityname" or "FXProject" now looks like "Fxproject". 

The other definition we need is the EntityId in proper case.  This is the primary id field for the custom entity.  For the FXProject entity the entityId is FXProjectId.

The two files we will modify today in the SalesLogix Application Architect(AA) are labeled ActivityList.ascx.cs and HistoryList.ascx.cs.  These files actually provide the code to support the pages that list the data. You can find these files in the AA under the Project Explorer tab.  In the tree control look for and open the Portal Manager, then Sage SalesLogix, then Support Files. We will work for the ActivityList.ascx.cs file first which is located in the Activity folder.  When you have the the file open, go to line 103 and hit enter twice. Add the following:

            if (entityName.Equals("Entityname"))//Mine
            {
                Page.Session["EntityId"] = entityId;//Mine
            }
            else//Mine
            {
                Page.Session["EntityId"] = "";//Mine
            }

The first entityName is actually code that should not be changed.  I bolded the Entityname and EntityId that need to be replaced with your definitions.

Still in the same file with the previous set of code in place go to line 140 and hit the enter key twice. Then add this code:

           if (entityName.Equals("Entityname"))//Mine
           {
               Page.Session["EntityId"] = entityId;//Mine
               if (((BoundField)(col)).DataField.Equals("Category"))//Mine
                   col.Visible = false;//Mine
               if (((BoundField)(col)).DataField.Equals("ContactName"))//Mine
                   col.Visible = false;//Mine
               if (((BoundField)(col)).DataField.Equals("Notes"))//Mine
                   col.Visible = true;//Mine
           }

This bit of code adjust the visibility of columns based on the Entity level your are on. You can customize this to fit the needs for your custom main entity.

For the last bit of code in this file navigate to line 302, hit enter once and add the following code. 

            case "Entityname"://Mine
                keyId = "EntityId";//Mine
                break;//Mine

This provides the keyId for the Activity grid so it knows what records to display when it is on your entity.  This is the exact same code the you will use starting on line 132 of the HistoryList.ascx.cs file.  You are currently in the Activity folder, the HistoryList file is located under the history folder.

That is enough for today.  We finish up with next post where we add these and other smart parts to the main entity page.

What's This?
  
Bookmark and Share

About George Jensen

   George Jensen is a Senior Developer for Customer FX Corporation.


Related Content
   Can I Bind an Attachment to a Specific Activity in Infor CRM version 7.54?
Recently I had a user ask if they could bind an attachment to a specific Activity within Infor CRM??
Posted on Jul 07, 2015 by Dale Richter to Infor CRM Questions & Answers
 
   Infor CRM (Formerly Saleslogix) Iterating through all tabs on a Page
 Using the TabWorskpace you can iterate through all the tabs on a page and do something with them, l
Posted on Jun 19, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
   Infor CRM (Formerly Saleslogix) Hiding Tabs at Runtime Without Using Modules
 As Ryan wrote a long time ago, you can create a module and add it to a page in the Infor CRM web cl
Posted on Jun 10, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
   How I assign ownership to a group of Leads in Infor CRM?
There is a tool within Infor CRM to align Accounts to different Account Owners. It is called Territory Re
Posted on Jun 05, 2015 by Dale Richter to Infor CRM Questions & Answers
 
   Infor CRM (Formerly Saleslogix) Adding a Client Side Confirmation on a Dependency Lookup in the Web Client
 We recently had a client who wanted to have a user confirmation prompt before a user was allowed to
Posted on May 28, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
Comments

 

Twitter Trackbacks for Adding Activities and History to a Custom Main Entity in the Saleslogix Web Client (Part 5) - George Jensen's Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Adding Activities and History to a Custom Main Entity in the Saleslogix Web Client (Part 5) - George Jensen's Blog         [customerfx.com]        on Topsy.com

June 6, 2010 10:51 AM

Leave a Comment

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