Login / Register  search  syndication  about

          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
   SalesLogix Cloud- Administration Options- Using Roles
In this webinar the user will learn to manage roles in the SalesLogix Web Client. These options are onl
Posted on Aug 20, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix 7.5.2 Speed Issues - How To Find the Slowdown
At times I have been asked how can I increase the performance of SalesLogix. For systems using SQL2005
Posted on Aug 13, 2010 by Mark Duthoy to SalesLogix Support
 
   SalesLogix Cloud- Administration Options- Creating a New Department
In this webinar we will look at the Administration Options in the SalesLogix Cloud. In this specific webi
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix Cloud- Administration Options- Creating a New Team
This Administrative webinar will show the user how to create a new Team for ownership of records. This is
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   Relating Assets to Tickets in SalesLogix Web and SalesLogix Cloud [Video]
In this SalesLogix Training webinar the user will learn how to relate an Asset to a Ticket in SalesLogix
Posted on Aug 12, 2010 by Dale Richter to Free 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
 

Manuel Gahona said:

I try to include this code in a SLX 7.5.2 OnLoad Event, but it's not working.

I think that the issue is in this line:

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

April 7, 2010 1:00 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