Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, June 28, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Custom Entity Save Problem
Matias
Posts: 3
 
Custom Entity Save ProblemYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 12 2:43 PM
fiogf49gjkf0d

Hello everybody,


 


I have a little issue at the moment of saving.


I replaced the builtin Save business rule, for a custom one because I needed some data validation before saving. Thats working OK, the thing is that when I correct the data that is throwing the validation exception, the validation keeps poping up. The old data stay saved on the entity object and I dont know how to refresh it or something.


 


Here is the code. It is in a button on a toolbar:


 


 


<p>public static void btnGuardar_OnClickStep( IDetalleAgencia form,  EventArgs args)

      {

IAgencia agencia = form.CurrentEntity as IAgencia;

string CUIT = agencia.Account.AccountX.Docnumero.ToString();

string tipo = agencia.Account.AccountX.Doctipo.ToString().Trim();

Sage.Platform.WebPortal.Services.IPanelRefreshService refresh = form.WorkItem.Services.Get<Sage.Platform.WebPortal.Services.IPanelRefreshService>();

if (tipo == "CUIT")

{

try

{

int num = int.Parse(CUIT);

if (CUIT.Substring(0,2) == "20" || CUIT.Substring(0,2) == "23" || CUIT.Substring(0,2) == "24" || CUIT.Substring(0,2) == "27" || CUIT.Substring(0,2) == "30" || CUIT.Substring(0,2) == "33" || CUIT.Substring(0,2) == "34")

{

if (agencia.ValidarCUIT())

{

agencia.Save();

refresh.RefreshMainWorkspace();

}

else

{

throw new Sage.Platform.Application.ValidationException("CUIT - Inválido, por dígito verificador." + CUIT);

}

}

else

{

throw new Sage.Platform.Application.ValidationException("CUIT - Invalido, comienzo incorrecto." + CUIT);

}

}

catch (Exception e)

{

throw new Sage.Platform.Application.ValidationException("CUIT - Inválido, no es un número." + CUIT);

refresh.RefreshMainWorkspace();

}

}

}


 

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/28/2025 12:32:44 AM