tips & tricks


Calendario
febbraio 2025
lmmgvsd
272829303112
3456789
10111213141516
17181920212223
242526272812
3456789

Gestione dei Messaggi lato Client

Buondì,

Un modo per riuscire a gestire i messaggi lato client, e quindi via jscript, è creare un'entità custom che possiamo chiamare "Custom Messages".

In questa entità possiamo mettere una coppia (Key ,Value) e richiamare questa entità via Ajax. In questo modo possiamo gestire comodamente anche il cambio di lingua. Ecco un esempio di codice:

function GetCustomMessage(key)
{
    var parameter = new Parameter("key", key);
    var params = new Array(parameter);
   
    var oXml = GetXml("XMLGetCustomMessage", params);
    var value = GetValue(oXml, "Value");;
   
    if(value == null || value == '')
        value = stringFormat("[Custom Message (Key='{0}') not found]", key);
       
    return value;
}

alert(GetCustomMessage('chkQuickFormFieldsMessage'));

 

 

Categoria: CRM 4.0
venerdì, 29 mag 2009 Ore. 12.36
Archivio Posts
Anno 2020

Anno 2018

Anno 2015

Anno 2013

Anno 2011

Anno 2010

Anno 2009

Anno 2008
Statistiche
  • Views Home Page: 15.302
  • Views Posts: 58.693
  • Views Gallerie: 2.837
  • n° Posts: 117
  • n° Commenti: 1
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003