Login / Register  search  syndication

          Kris Halsrud's Blog

Kris Halsrud on development and Integration with CRM and Development

How to tell if a SalesLogix web form is in insert or edit mode

One of the cool things about the SalesLogix web client is that you can re-use the same form for inserting a new record or updating a record.  While you could do this with Data forms in the SalesLogix LAN client, if you wanted to use the same form for, say inserting an account, as working with an existing one you needed to write code around what to do based on the mode.  With the SalesLogix web forms the system automatically does all of the insert/update logic for you based on if it is a new record or not.  You just need to call the Entity.Save() method that is standard on every entity and it will do the logic for you.

With that being said how can you tell if your shared form is in insert mode or not?  Maybe you have a field you want to show on the insert view but not the edit view, or vice versa.  Well here is the answer:

Sage.Platform.WebPortal.EntityPage page = Page as Sage.Platform.WebPortal.EntityPage;

if (page.ModeId.ToUpper() == "INSERT")
{
//Do some stuff for only the insert mode
}
else
{
//Do some stuff for just the edit mode
}

What's This?
Bookmark and Share

About Kris Halsrud

   Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.


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

 

Twitter Trackbacks for How to tell if a SalesLogix web form is in insert or edit mode - Kris Halsrud [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 How to tell if a SalesLogix web form is in insert or edit mode - Kris Halsrud         [customerfx.com]        on Topsy.com

November 19, 2009 1:34 PM
 

Ryan Farley said:

Kris, I also have a post of this outlining a few ways to get this page mode here: customerfx.com/.../determining-the-page-mode-at-runtime-in-saleslogix-web.aspx

-Ryan

November 19, 2009 10:04 PM

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