Programming, technology, and CRM – from a Belgian programmer exiled to Missouri
  • rss
  • Home
  • Soft Gallery
    • autosvnbackup.sh
    • VBScript Snippets
  • Contact Me
  • Welcome

Web Services in Saleslogix

Nicolas Galler | June 11, 2008

Just a quick tip in case you need to define a web service that accesses the Saleslogix entities – it works great, as long as you remember to enable the attribute to let it access the session variables (session state is disabled by default on web services).

For example this is the web service I use for a cascading dropdown (using the Ajax control toolkit stuff).  The EnableSession=true was the key part in getting this to work:

[System.Web.Services.WebMethod(EnableSession=true)]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public CascadingDropDownNameValue[] GetSubSpecialties(string knownCategoryValues, string category)
{
    StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
    if (!kv.ContainsKey("specialty"))
        return null;
    var pklItems = PickList.GetPickListItemsByName("SubSpecialty " + kv["specialty"], true);
    var values = new List<CascadingDropDownNameValue>();
    foreach (var p in pklItems)
    {
        values.Add(new CascadingDropDownNameValue(p.Text, p.Code));
    }
    return values.ToArray();
}
Categories
Uncategorized
Comments rss
Comments rss
Trackback
Trackback

« Saving an Attachment to Saleslogix Creating and Displaying a Group Programmatically »

Leave a Reply

Click here to cancel reply.

Categories

  • Dojo (1)
  • Experiments (4)
  • Force.com (2)
  • Interesting (1)
  • Javascript (3)
  • MSCRM (1)
  • Programming (63)
  • Rant (3)
  • Saleslogix (41)
  • Tricks (8)
  • Uncategorized (32)

Post History

  • 2011
    • January (3)
    • February (2)
    • March (1)
  • 2010
    • January (3)
    • March (3)
    • April (2)
    • August (2)
    • October (4)
    • November (1)
    • December (2)
  • 2009
    • March (2)
    • April (1)
    • May (3)
    • June (3)
    • July (1)
    • September (3)
    • October (2)
    • December (5)
  • 2008
    • January (9)
    • February (4)
    • March (9)
    • April (1)
    • May (5)
    • June (8)
    • July (1)
    • August (2)
    • September (1)
    • November (1)
    • December (3)
  • 2007
    • January (3)
    • February (7)
    • March (1)
    • April (3)
    • May (6)
    • June (2)
    • July (1)
    • August (2)
    • September (5)
    • October (3)
    • November (5)
    • December (4)
  • 2006
    • January (2)
    • September (1)
    • November (3)
    • December (4)
  • 2005
    • April (1)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox