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
   Using SQL triggers to enforce data rules in SalesLogix.
In a recent project, I used triggers to enforce some data rules in the Ticket area of SalesLogix. We did
Posted on Feb 05, 2010 by Jason Buss to Jason Buss' Blog
 
   SalesLogix 7.5.2 Hot Fix 1 – the Dependency Lookup is still broken
SalesLogix released hotfix 1 for SalesLogix 7.5.2.  One of the published resolutions of the hot fix
Posted on Jan 27, 2010 by Kris Halsrud to Kris Halsrud's Blog
 
   Message box dialogs in the SalesLogix web client
In the web client, there's not an easy way to present the user with a multiple choice dialog. One q
Posted on Jan 14, 2010 by Jason Buss to Jason Buss' Blog
 
   Clearing user default settings in the SalesLogix web client
Each user of the SalesLogix web client can define various user based  settings while they are using
Posted on Jan 13, 2010 by Kris Halsrud to Kris Halsrud's Blog
 
   Web Viewers-Inserting a note
This week I have discovered that the Web Viewer licensed used in version 7.51 is unable to enter notes on
Posted on Jan 08, 2010 by Dale Richter to Tech Talk
 
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