I found out yesterday that a couple other MVP's put together a community optionset import tool and community library of freely available optionsets. Tanguy Touzard and Jerry Weinstock are to thank for this one. I recommend checking out the free tool and optionsets out there. Also, feel free to contribute your optionsets to the library.
http://www.crmoptionset.com/
- Happy Thursday!
Thursday, August 30, 2012
Tuesday, August 28, 2012
List of Currencies Included With Microsoft Dynamics CRM 2011 in XML Format
I got asked the question how to get at the list of currencies in CRM programmatically. I looked everywhere and couldn't find them in the org or server database. I see where it's calling a saved query against some .NET API that is buried in the program. If anyone wants an easy way to access them in a program, here they are in XML format with their codes, precisions, symbols, etc... It doesn't look like you get it very easily at all programmatically.
This is the out of the box list. Remember, you can also add your own user defined currencies in case you made something up like "MileyBucks" in your own little world :)
- Hopefully it helps someone.
-
This is the out of the box list. Remember, you can also add your own user defined currencies in case you made something up like "MileyBucks" in your own little world :)
<DocumentElement><currency><regionname>Afghanistan</regionname><currencyname>افغانى</currencyname><isocurrencycode>AFN</isocurrencycode><currencysymbol>؋</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Albania</regionname><currencyname>Lek</currencyname><isocurrencycode>ALL</isocurrencycode><currencysymbol>Lek</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Algeria</regionname><currencyname>Dinar</currencyname><isocurrencycode>DZD</isocurrencycode><currencysymbol>DZD</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Algeria</regionname><currencyname>دينار جزائري</currencyname><isocurrencycode>DZD</isocurrencycode><currencysymbol>د.ج.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Argentina</regionname><currencyname>Peso</currencyname><isocurrencycode>ARS</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Armenia</regionname><currencyname>դրամ</currencyname><isocurrencycode>AMD</isocurrencycode><currencysymbol>դր.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Australia</regionname><currencyname>Australian Dollar</currencyname><isocurrencycode>AUD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Austria</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Azerbaijan</regionname><currencyname>manat</currencyname><isocurrencycode>AZN</isocurrencycode><currencysymbol>man.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Azerbaijan</regionname><currencyname>рубль</currencyname><isocurrencycode>AZN</isocurrencycode><currencysymbol>ман.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Bahrain</regionname><currencyname>دينار بحريني</currencyname><isocurrencycode>BHD</isocurrencycode><currencysymbol>د.ب.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Bangladesh</regionname><currencyname>টাকা</currencyname><isocurrencycode>BDT</isocurrencycode><currencysymbol>৳</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Belarus</regionname><currencyname>рубль</currencyname><isocurrencycode>BYR</isocurrencycode><currencysymbol>р.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Belgium</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Belize</regionname><currencyname>Belize Dollar</currencyname><isocurrencycode>BZD</isocurrencycode><currencysymbol>BZ$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Bolivarian Republic of Venezuela</regionname><currencyname>Bolívar</currencyname><isocurrencycode>VEF</isocurrencycode><currencysymbol>Bs. F.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Bolivia</regionname><currencyname>Boliviano</currencyname><isocurrencycode>BOB</isocurrencycode><currencysymbol>$b</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Bosnia and Herzegovina</regionname><currencyname>konvertibilna marka</currencyname><isocurrencycode>BAM</isocurrencycode><currencysymbol>KM</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Bosnia and Herzegovina</regionname><currencyname>конвертибилна марка</currencyname><isocurrencycode>BAM</isocurrencycode><currencysymbol>КМ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Brazil</regionname><currencyname>Real</currencyname><isocurrencycode>BRL</isocurrencycode><currencysymbol>R$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Brunei Darussalam</regionname><currencyname>Ringgit</currencyname><isocurrencycode>BND</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Bulgaria</regionname><currencyname>България лев</currencyname><isocurrencycode>BGN</isocurrencycode><currencysymbol>лв.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Cambodia</regionname><currencyname>x179Aៀល</currencyname><isocurrencycode>KHR</isocurrencycode><currencysymbol>៛</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Canada</regionname><currencyname>ᑲᓇᑕᐅᑉ ᑮᓇᐅᔭᖓ</currencyname><isocurrencycode>CAD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Canada</regionname><currencyname>Canadian Dollar</currencyname><isocurrencycode>CAD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Canada</regionname><currencyname>Kanataup Kiinaujanga;</currencyname><isocurrencycode>CAD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Canada</regionname><currencyname>Dollar canadien</currencyname><isocurrencycode>CAD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Caribbean</regionname><currencyname>US Dollar</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Chile</regionname><currencyname>Peso</currencyname><isocurrencycode>CLP</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Colombia</regionname><currencyname>Peso</currencyname><isocurrencycode>COP</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Costa Rica</regionname><currencyname>Colón</currencyname><isocurrencycode>CRC</isocurrencycode><currencysymbol>₡</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Croatia</regionname><currencyname>hrvatska kuna</currencyname><isocurrencycode>HRK</isocurrencycode><currencysymbol>kn</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Czech Republic</regionname><currencyname>Koruna Česká</currencyname><isocurrencycode>CZK</isocurrencycode><currencysymbol>Kč</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Denmark</regionname><currencyname>Dansk krone</currencyname><isocurrencycode>DKK</isocurrencycode><currencysymbol>kr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Dominican Republic</regionname><currencyname>Peso</currencyname><isocurrencycode>DOP</isocurrencycode><currencysymbol>RD$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Ecuador</regionname><currencyname>US Dolar</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Egypt</regionname><currencyname>جنيه مصري</currencyname><isocurrencycode>EGP</isocurrencycode><currencysymbol>ج.م.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>El Salvador</regionname><currencyname>US Dolar</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Estonia</regionname><currencyname>Kroon</currencyname><isocurrencycode>EEK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Ethiopia</regionname><currencyname>ብር</currencyname><isocurrencycode>ETB</isocurrencycode><currencysymbol>ETB</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Faroe Islands</regionname><currencyname>Dansk krone</currencyname><isocurrencycode>DKK</isocurrencycode><currencysymbol>kr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Finland</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Finland</regionname><currencyname>evro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>France</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Georgia</regionname><currencyname>ლარი</currencyname><isocurrencycode>GEL</isocurrencycode><currencysymbol>Lari</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Germany</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Greece</regionname><currencyname>ευρώ</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Greenland</regionname><currencyname>korunni</currencyname><isocurrencycode>DKK</isocurrencycode><currencysymbol>kr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Guatemala</regionname><currencyname>Quetzal</currencyname><isocurrencycode>GTQ</isocurrencycode><currencysymbol>Q</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Honduras</regionname><currencyname>Lempira</currencyname><isocurrencycode>HNL</isocurrencycode><currencysymbol>L.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Hong Kong S.A.R.</regionname><currencyname>港幣</currencyname><isocurrencycode>HKD</isocurrencycode><currencysymbol>HK$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Hungary</regionname><currencyname>forint</currencyname><isocurrencycode>HUF</isocurrencycode><currencysymbol>Ft</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Iceland</regionname><currencyname>Króna</currencyname><isocurrencycode>ISK</isocurrencycode><currencysymbol>kr.</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>India</regionname><currencyname>रुपया</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>रु</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>টাকা</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>টা</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>ਰੁਪਿਆ</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ਰੁ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>રૂપિયો</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>રૂ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>ଟଙ୍କା</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ଟ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>ரூபாய்</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ரூ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>రూపాయి</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>రూ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>ರೂಪಾಯಿ</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ರೂ</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>രൂപ</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ക</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>টকা</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>ট</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>रु्यकम्</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>रु</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>रुपय</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>रु</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>India</regionname><currencyname>Rupee;</currencyname><isocurrencycode>INR</isocurrencycode><currencysymbol>Rs.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Indonesia</regionname><currencyname>Rupiah</currencyname><isocurrencycode>IDR</isocurrencycode><currencysymbol>Rp</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Iran</regionname><currencyname>رىال</currencyname><isocurrencycode>IRR</isocurrencycode><currencysymbol>ريال</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Iraq</regionname><currencyname>دينار عراقي</currencyname><isocurrencycode>IQD</isocurrencycode><currencysymbol>د.ع.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Ireland</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Islamic Republic of Pakistan</regionname><currencyname>روپيه</currencyname><isocurrencycode>PKR</isocurrencycode><currencysymbol>Rs</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Israel</regionname><currencyname>שקל חדש</currencyname><isocurrencycode>ILS</isocurrencycode><currencysymbol>₪</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Italy</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Jamaica</regionname><currencyname>Jamaican Dollar</currencyname><isocurrencycode>JMD</isocurrencycode><currencysymbol>J$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Japan</regionname><currencyname>円</currencyname><isocurrencycode>JPY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Jordan</regionname><currencyname>دينار اردني</currencyname><isocurrencycode>JOD</isocurrencycode><currencysymbol>د.ا.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Kazakhstan</regionname><currencyname>Т</currencyname><isocurrencycode>KZT</isocurrencycode><currencysymbol>Т</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Kenya</regionname><currencyname>Shilingi</currencyname><isocurrencycode>KES</isocurrencycode><currencysymbol>S</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Korea</regionname><currencyname>원</currencyname><isocurrencycode>KRW</isocurrencycode><currencysymbol>₩</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Kuwait</regionname><currencyname>دينار كويتي</currencyname><isocurrencycode>KWD</isocurrencycode><currencysymbol>د.ك.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Kyrgyzstan</regionname><currencyname>сом</currencyname><isocurrencycode>KGS</isocurrencycode><currencysymbol>сом</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Lao P.D.R.</regionname><currencyname>ກີບ</currencyname><isocurrencycode>LAK</isocurrencycode><currencysymbol>₭</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Latvia</regionname><currencyname>Lats</currencyname><isocurrencycode>LVL</isocurrencycode><currencysymbol>Ls</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Lebanon</regionname><currencyname>ليرة لبناني</currencyname><isocurrencycode>LBP</isocurrencycode><currencysymbol>ل.ل.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Libya</regionname><currencyname>دينار ليبي</currencyname><isocurrencycode>LYD</isocurrencycode><currencysymbol>د.ل.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Liechtenstein</regionname><currencyname>Schweizer Franken</currencyname><isocurrencycode>CHF</isocurrencycode><currencysymbol>CHF</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Lithuania</regionname><currencyname>Litas</currencyname><isocurrencycode>LTL</isocurrencycode><currencysymbol>Lt</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Luxembourg</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Luxembourg</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Macao S.A.R.</regionname><currencyname>澳門幣</currencyname><isocurrencycode>MOP</isocurrencycode><currencysymbol>MOP</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Macedonia (FYROM)</regionname><currencyname>денар</currencyname><isocurrencycode>MKD</isocurrencycode><currencysymbol>ден.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Malaysia</regionname><currencyname>Ringgit Malaysia</currencyname><isocurrencycode>MYR</isocurrencycode><currencysymbol>RM</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Malaysia</regionname><currencyname>Malaysian Ringgit</currencyname><isocurrencycode>MYR</isocurrencycode><currencysymbol>RM</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Maldives</regionname><currencyname>ރުފިޔާ</currencyname><isocurrencycode>MVR</isocurrencycode><currencysymbol>ރ.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Malta</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Mexico</regionname><currencyname>Peso</currencyname><isocurrencycode>MXN</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Mongolia</regionname><currencyname>Төгрөг</currencyname><isocurrencycode>MNT</isocurrencycode><currencysymbol>₮</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Montenegro</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Montenegro</regionname><currencyname>Еуро</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Morocco</regionname><currencyname>درهم مغربي</currencyname><isocurrencycode>MAD</isocurrencycode><currencysymbol>د.م.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Nepal</regionname><currencyname>रुपैयाँ</currencyname><isocurrencycode>NPR</isocurrencycode><currencysymbol>रु</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Netherlands</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>New Zealand</regionname><currencyname>tāra</currencyname><isocurrencycode>NZD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>New Zealand</regionname><currencyname>New Zealand Dollar</currencyname><isocurrencycode>NZD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Nicaragua</regionname><currencyname>Córdoba</currencyname><isocurrencycode>NIO</isocurrencycode><currencysymbol>C$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Nigeria</regionname><currencyname>Naira</currencyname><isocurrencycode>NIO</isocurrencycode><currencysymbol>N</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Norway</regionname><currencyname>Norsk krone</currencyname><isocurrencycode>NOK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Norway</regionname><currencyname>kruvdno</currencyname><isocurrencycode>NOK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Norway</regionname><currencyname>kråvnnå</currencyname><isocurrencycode>NOK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Norway</regionname><currencyname>kråvnoe</currencyname><isocurrencycode>NOK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Oman</regionname><currencyname>ريال عماني</currencyname><isocurrencycode>OMR</isocurrencycode><currencysymbol>ر.ع.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Panama</regionname><currencyname>Balboa</currencyname><isocurrencycode>PAB</isocurrencycode><currencysymbol>B/.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Paraguay</regionname><currencyname>Guaraní</currencyname><isocurrencycode>PYG</isocurrencycode><currencysymbol>Gs</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>People's Republic of China</regionname><currencyname>མི་དམངས་ཤོག་སྒོཪ།</currencyname><isocurrencycode>CNY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>People's Republic of China</regionname><currencyname>ꎆꃀ</currencyname><isocurrencycode>CNY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>People's Republic of China</regionname><currencyname>خەلق پۇلى</currencyname><isocurrencycode>CNY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>People's Republic of China</regionname><currencyname>人民币</currencyname><isocurrencycode>CNY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>People's Republic of China</regionname><currencyname>ᠠᠷᠠᠳ ᠤᠨ ᠵᠤᠭᠤᠰ</currencyname><isocurrencycode>CNY</isocurrencycode><currencysymbol>¥</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Peru</regionname><currencyname>Nuevo Sol</currencyname><isocurrencycode>PEN</isocurrencycode><currencysymbol>S/.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Philippines</regionname><currencyname>Philippine Peso</currencyname><isocurrencycode>PHP</isocurrencycode><currencysymbol>PhP</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Philippines</regionname><currencyname>Philippine Peso</currencyname><isocurrencycode>PHP</isocurrencycode><currencysymbol>Php</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Poland</regionname><currencyname>Złoty</currencyname><isocurrencycode>PLN</isocurrencycode><currencysymbol>zł</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Portugal</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Principality of Monaco</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Puerto Rico</regionname><currencyname>US Dollar</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Qatar</regionname><currencyname>ريال قطري</currencyname><isocurrencycode>QAR</isocurrencycode><currencysymbol>ر.ق.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Romania</regionname><currencyname>Leu</currencyname><isocurrencycode>RON</isocurrencycode><currencysymbol>lei</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Russia</regionname><currencyname>рубль</currencyname><isocurrencycode>RUB</isocurrencycode><currencysymbol>р.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Russia</regionname><currencyname>һум</currencyname><isocurrencycode>RUB</isocurrencycode><currencysymbol>һ.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Russia</regionname><currencyname>солкуобай</currencyname><isocurrencycode>RUB</isocurrencycode><currencysymbol>с.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Rwanda</regionname><currencyname>Ifaranga</currencyname><isocurrencycode>RWF</isocurrencycode><currencysymbol>RWF</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Saudi Arabia</regionname><currencyname>ريال سعودي</currencyname><isocurrencycode>SAR</isocurrencycode><currencysymbol>ر.س.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Senegal</regionname><currencyname>XOF Senegal</currencyname><isocurrencycode>XOF</isocurrencycode><currencysymbol>XOF</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Serbia</regionname><currencyname>dinar</currencyname><isocurrencycode>RSD</isocurrencycode><currencysymbol>Din.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Serbia</regionname><currencyname>динар</currencyname><isocurrencycode>RSD</isocurrencycode><currencysymbol>Дин.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Serbia and Montenegro (Former)</regionname><currencyname>dinar</currencyname><isocurrencycode>CSD</isocurrencycode><currencysymbol>Din.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Serbia and Montenegro (Former)</regionname><currencyname>динар</currencyname><isocurrencycode>CSD</isocurrencycode><currencysymbol>Дин.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Singapore</regionname><currencyname>新币</currencyname><isocurrencycode>SGD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Singapore</regionname><currencyname>Singapore Dollar</currencyname><isocurrencycode>SGD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Slovakia</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Slovenia</regionname><currencyname>Euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>South Africa</regionname><currencyname>Rand</currencyname><isocurrencycode>ZAR</isocurrencycode><currencysymbol>R</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Spain</regionname><currencyname>euro</currencyname><isocurrencycode>EUR</isocurrencycode><currencysymbol>€</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Sri Lanka</regionname><currencyname>රුපියල්</currencyname><isocurrencycode>LKR</isocurrencycode><currencysymbol>රු.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Sweden</regionname><currencyname>Svensk krona</currencyname><isocurrencycode>SEK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Sweden</regionname><currencyname>kruvdno</currencyname><isocurrencycode>SEK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Sweden</regionname><currencyname>kråvnnå</currencyname><isocurrencycode>SEK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Sweden</regionname><currencyname>kråvnoe</currencyname><isocurrencycode>SEK</isocurrencycode><currencysymbol>kr</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Switzerland</regionname><currencyname>Franc svizzer</currencyname><isocurrencycode>CHF</isocurrencycode><currencysymbol>fr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Switzerland</regionname><currencyname>Schweizer Franken</currencyname><isocurrencycode>CHF</isocurrencycode><currencysymbol>Fr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Switzerland</regionname><currencyname>Franco svizzero</currencyname><isocurrencycode>CHF</isocurrencycode><currencysymbol>fr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Switzerland</regionname><currencyname>Franc suisse</currencyname><isocurrencycode>CHF</isocurrencycode><currencysymbol>fr.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Syria</regionname><currencyname>جنيه سوري</currencyname><isocurrencycode>SYP</isocurrencycode><currencysymbol>ل.س.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Syria</regionname><currencyname>ليرة سوري</currencyname><isocurrencycode>SYP</isocurrencycode><currencysymbol>ل.س.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Taiwan</regionname><currencyname>新台幣</currencyname><isocurrencycode>TWD</isocurrencycode><currencysymbol>NT$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Tajikistan</regionname><currencyname>рубл</currencyname><isocurrencycode>TJS</isocurrencycode><currencysymbol>т.р.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Thailand</regionname><currencyname>บาท</currencyname><isocurrencycode>THB</isocurrencycode><currencysymbol>฿</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Trinidad and Tobago</regionname><currencyname>Trinidad Dollar</currencyname><isocurrencycode>TTD</isocurrencycode><currencysymbol>TT$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Tunisia</regionname><currencyname>دينار تونسي</currencyname><isocurrencycode>TND</isocurrencycode><currencysymbol>د.ت.</currencysymbol><currencyprecision>3</currencyprecision></currency><currency><regionname>Turkey</regionname><currencyname>Türk Lirası</currencyname><isocurrencycode>TRY</isocurrencycode><currencysymbol>TL</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Turkmenistan</regionname><currencyname>manat</currencyname><isocurrencycode>TMT</isocurrencycode><currencysymbol>m.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>U.A.E.</regionname><currencyname>درهم اماراتي</currencyname><isocurrencycode>AED</isocurrencycode><currencysymbol>د.إ.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Ukraine</regionname><currencyname>гривня</currencyname><isocurrencycode>UAH</isocurrencycode><currencysymbol>₴</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>United Kingdom</regionname><currencyname>UK Pound Sterling</currencyname><isocurrencycode>GBP</isocurrencycode><currencysymbol>£</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>United Kingdom</regionname><currencyname>Nota Bhreatannach</currencyname><isocurrencycode>GBP</isocurrencycode><currencysymbol>£</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>United Kingdom</regionname><currencyname>Pound Sterling</currencyname><isocurrencycode>GBP</isocurrencycode><currencysymbol>£</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>United States</regionname><currencyname>US Dollar</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>United States</regionname><currencyname>Dólar de EE.UU.</currencyname><isocurrencycode>USD</isocurrencycode><currencysymbol>$</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Uruguay</regionname><currencyname>Peso</currencyname><isocurrencycode>UYU</isocurrencycode><currencysymbol>$U</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Uzbekistan</regionname><currencyname>so‘m</currencyname><isocurrencycode>UZS</isocurrencycode><currencysymbol>so'm</currencysymbol><currencyprecision>0</currencyprecision></currency><currency><regionname>Uzbekistan</regionname><currencyname>сўм</currencyname><isocurrencycode>UZS</isocurrencycode><currencysymbol>сўм</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Vietnam</regionname><currencyname>Đồng</currencyname><isocurrencycode>VND</isocurrencycode><currencysymbol>₫</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Yemen</regionname><currencyname>ريال يمني</currencyname><isocurrencycode>YER</isocurrencycode><currencysymbol>ر.ي.</currencysymbol><currencyprecision>2</currencyprecision></currency><currency><regionname>Zimbabwe</regionname><currencyname>Zimbabwe Dollar</currencyname><isocurrencycode>ZWL</isocurrencycode><currencysymbol>Z$</currencysymbol><currencyprecision>2</currencyprecision></currency></DocumentElement>
- Hopefully it helps someone.
-
Monday, August 27, 2012
Hmm... Maybe I Should Go "Dark" For Awhile.
Ok, there is very little new that I can in .NET 4.5 and Visual Studio 2012 from a code standpoint apart from the new metro stuff concerning Javascript and HTML 5 (all the Windows 8 goodness), but gosh darn it I love this interface. I first fired it up and thought was absolutely sterile and kinda lame, but then I found out I could go Tools - Options - Environment - General and change my Color Theme to Dark.
I don't know if I can ever go back to Visual Studio 2010. The other really helpful feature I have found for you people with more than one monitor is Rafting.
Friday, August 24, 2012
Microsoft Dynamics CRM 2011 Compatibility With .NET 4.5
I have been doing some tests lately and have had a lot of luck recently with .NET 4.5 being compatible with Microsoft Dynamics CRM 2011. I haven't run into an unsuccessful scenario yet but I am wondering if anyone else in the community has.
According to this KB article it seems to be compatible since Update Rollup 8:
http://support.microsoft.com/kb/2669061
Here is what I have tried so far and all of these worked:
Interestingly enough my first .NET 4.5 plugin fired successfully even though .NET 4.5 wasn't installed on the CRM server. You only need the 4.5 framework installed if you use new 4.5 functionality. When I added some new code functionality in my plugin it did fail on that line of code until I installed the 4.5 framework on the server and rebooted. That fixed the issue and the plugin fired normally.
I am wondering if anyone has found anything that doesn't work so far? Let me know!
-Happy Friday!
According to this KB article it seems to be compatible since Update Rollup 8:
http://support.microsoft.com/kb/2669061
Here is what I have tried so far and all of these worked:
- Creating applications that talk to CRM compiled in 4.5 that reference the 4.0 assemblies included with the SDK
- Registering 4.5 compiled plugins using the plugin registration tool (also recompiled to 4.5).
- Using new .NET 4.5 functionality in plugins (required 4.5 framework to be installed on server and a server reboot)
Interestingly enough my first .NET 4.5 plugin fired successfully even though .NET 4.5 wasn't installed on the CRM server. You only need the 4.5 framework installed if you use new 4.5 functionality. When I added some new code functionality in my plugin it did fail on that line of code until I installed the 4.5 framework on the server and rebooted. That fixed the issue and the plugin fired normally.
I am wondering if anyone has found anything that doesn't work so far? Let me know!
-Happy Friday!
Wednesday, August 22, 2012
Query a User's Schedule for Open Time Slots Using VB.NET in Microsoft Dynamics CRM 2011
This illustration shows how to query a user's schedule for open time blocks using VB.NET in Microsoft Dynamics CRM 2011 with QueryScheduleRequest.
If you need help instantiating a service object in .NET within a plugin check out this post:
http://mileyja.blogspot.com/2011/04/instantiating-service-object-within.html
Ok, here is what the code looks like!
In VB.NET
Dim reqWAI As New WhoAmIRequest()
Dim respWAI As WhoAmIResponse = DirectCast(_serviceProxy.Execute(reqWAI), WhoAmIResponse)
Dim reqSchedule As New QueryScheduleRequest()
reqSchedule.ResourceId = respWAI.UserId
reqSchedule.Start = DateTime.Now
reqSchedule.End = DateTime.Today.AddDays(3)
Dim tmc As New TimeCode()
tmc = TimeCode.Available
reqSchedule.TimeCodes = New TimeCode() {TimeCode.Available}
Dim respSchedule As QueryScheduleResponse = DirectCast(slos.Execute(reqSchedule), QueryScheduleResponse)
If respSchedule.TimeInfos.Length > 0 Then
'act on timeslots
Else
'user has no free time that meets these parameters
End If
If you need help instantiating a service object in .NET within a plugin check out this post:
http://mileyja.blogspot.com/2011/04/instantiating-service-object-within.html
I hope this helps!
-
-
Labels:
CRM,
CRM 2011,
Microsoft Dynamics CRM,
SDK,
VB.NET
Monday, August 20, 2012
Query a User's Schedule for Open Time Blocks Using .NET and Jscript in Microsoft Dynamics CRM 2011
This illustration shows how to query a user's schedule for open time blocks using C# or Jscript in Microsoft Dynamics CRM 2011 with QueryScheduleRequest.
If you need help instantiating a service object in .NET within a plugin check out this post:
http://mileyja.blogspot.com/2011/04/instantiating-service-object-within.html
Ok, here is what the code looks like!
First in C#:
WhoAmIRequest reqWAI = new WhoAmIRequest();
WhoAmIResponse respWAI = (WhoAmIResponse)_serviceProxy.Execute(reqWAI);
QueryScheduleRequest reqSchedule = new QueryScheduleRequest();
reqSchedule.ResourceId = respWAI.UserId;
reqSchedule.Start = DateTime.Now;
reqSchedule.End = DateTime.Today.AddDays(3);
reqSchedule.TimeCodes = new TimeCode[] { TimeCode.Available };
QueryScheduleResponse respSchedule = (QueryScheduleResponse)service.Execute(reqSchedule);
if (respSchedule.TimeInfos.Length > 0)
{
//act on time slots
}
If you need help instantiating a service object in .NET within a plugin check out this post:
http://mileyja.blogspot.com/2011/04/instantiating-service-object-within.html
Now here is the Jscript nicely formatted by the CRM 2011 SOAP formatter. Available at: http://crm2011soap.codeplex.com/
Now in Jscript
This example is asynchronous, if you want to learn how to make JScript SOAP calls synchronously please visit this post: http://mileyja.blogspot.com/2011/07/using-jscript-to-access-soap-web.html
Now in Jscript
This example is asynchronous, if you want to learn how to make JScript SOAP calls synchronously please visit this post: http://mileyja.blogspot.com/2011/07/using-jscript-to-access-soap-web.html
if (typeof (SDK) == "undefined")
{ SDK = { __namespace: true }; }
//This will establish a more unique namespace for functions in this library. This will reduce the
// potential for functions to be overwritten due to a duplicate name when the library is loaded.
SDK.SAMPLES = {
_getServerUrl: function () {
///<summary>
/// Returns the URL for the SOAP endpoint using the context information available in the form
/// or HTML Web resource.
///</summary>
var ServicePath = "/XRMServices/2011/Organization.svc/web";
var serverUrl = "";
if (typeof GetGlobalContext == "function") {
var context = GetGlobalContext();
serverUrl = context.getServerUrl();
}
else {
if (typeof Xrm.Page.context == "object") {
serverUrl = Xrm.Page.context.getServerUrl();
}
else
{ throw new Error("Unable to access the server URL"); }
}
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}
return serverUrl + ServicePath;
},
QueryScheduleRequest: function () {
var requestMain = ""
requestMain += "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">";
requestMain += " <s:Body>";
requestMain += " <Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">";
requestMain += " <request i:type=\"b:QueryScheduleRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\" xmlns:b=\"http://schemas.microsoft.com/crm/2011/Contracts\">";
requestMain += " <a:Parameters xmlns:c=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">";
requestMain += " <a:KeyValuePairOfstringanyType>";
requestMain += " <c:key>ResourceId</c:key>";
requestMain += " <c:value i:type=\"d:guid\" xmlns:d=\"http://schemas.microsoft.com/2003/10/Serialization/\">6e219f51-0310-4c4d-8c60-1c524e2ba7b3</c:value>";
requestMain += " </a:KeyValuePairOfstringanyType>";
requestMain += " <a:KeyValuePairOfstringanyType>";
requestMain += " <c:key>Start</c:key>";
requestMain += " <c:value i:type=\"d:dateTime\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\">2012-08-20T10:10:38.910063-05:00</c:value>";
requestMain += " </a:KeyValuePairOfstringanyType>";
requestMain += " <a:KeyValuePairOfstringanyType>";
requestMain += " <c:key>End</c:key>";
requestMain += " <c:value i:type=\"d:dateTime\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\">2012-08-23T00:00:00-05:00</c:value>";
requestMain += " </a:KeyValuePairOfstringanyType>";
requestMain += " <a:KeyValuePairOfstringanyType>";
requestMain += " <c:key>TimeCodes</c:key>";
requestMain += " <c:value i:type=\"b:ArrayOfTimeCode\">";
requestMain += " <b:TimeCode>Available</b:TimeCode>";
requestMain += " </c:value>";
requestMain += " </a:KeyValuePairOfstringanyType>";
requestMain += " </a:Parameters>";
requestMain += " <a:RequestId i:nil=\"true\" />";
requestMain += " <a:RequestName>QuerySchedule</a:RequestName>";
requestMain += " </request>";
requestMain += " </Execute>";
requestMain += " </s:Body>";
requestMain += "</s:Envelope>";
var req = new XMLHttpRequest();
req.open("POST", SDK.SAMPLES._getServerUrl(), true)
req.setRequestHeader("Accept", "application/xml, text/xml, */*");
req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
var successCallback = null;
var errorCallback = null;
req.onreadystatechange = function () { SDK.SAMPLES.QueryScheduleResponse(req, successCallback, errorCallback); };
req.send(requestMain);
},
QueryScheduleResponse: function (req, successCallback, errorCallback) {
///<summary>
/// Recieves the assign response
///</summary>
///<param name="req" Type="XMLHttpRequest">
/// The XMLHttpRequest response
///</param>
///<param name="successCallback" Type="Function">
/// The function to perform when an successfult response is returned.
/// For this message no data is returned so a success callback is not really necessary.
///</param>
///<param name="errorCallback" Type="Function">
/// The function to perform when an error is returned.
/// This function accepts a JScript error returned by the _getError function
///</param>
if (req.readyState == 4) {
if (req.status == 200) {
if (successCallback != null)
{ successCallback(); }
}
else {
errorCallback(SDK.SAMPLES._getError(req.responseXML));
}
}
},
_getError: function (faultXml) {
///<summary>
/// Parses the WCF fault returned in the event of an error.
///</summary>
///<param name="faultXml" Type="XML">
/// The responseXML property of the XMLHttpRequest response.
///</param>
var errorMessage = "Unknown Error (Unable to parse the fault)";
if (typeof faultXml == "object") {
try {
var bodyNode = faultXml.firstChild.firstChild;
//Retrieve the fault node
for (var i = 0; i < bodyNode.childNodes.length; i++) {
var node = bodyNode.childNodes[i];
//NOTE: This comparison does not handle the case where the XML namespace changes
if ("s:Fault" == node.nodeName) {
for (var j = 0; j < node.childNodes.length; j++) {
var faultStringNode = node.childNodes[j];
if ("faultstring" == faultStringNode.nodeName) {
errorMessage = faultStringNode.text;
break;
}
}
break;
}
}
}
catch (e) { };
}
return new Error(errorMessage);
},
__namespace: true
};
To understand how to parse the response please review my post on using the DOM parser.
Now you can call the SDK.SAMPLES.QueryScheduleRequest function from your form jscript handler.
Thats all there is to it!
-
-
Friday, August 17, 2012
Any Volunteers for CRM 2011 Community Project
I am planning to build a CodePlex project to speed up XRM development of apps and make apps much easier to port to CRM 2011. If a developer type that would love to help out, please contact me on my about me page or shoot me a note on Linked IN.
- Thanks!
- Thanks!
Labels:
Community,
CRM,
CRM 2011,
Microsoft Dynamics CRM
MSDN Just Released Windows 8 RTM and Visual Studio 2012 RTM
In case anyone hasn't noticed, yesterday MSDN released Visual Studio 2012 RTM and Windows 8 RTM. So if you have an MSDN license I highly recommend going out and checking them out.
- Hope that makes for a happy Friday!
- Hope that makes for a happy Friday!
Friday, August 10, 2012
A New Blog You Might be Interested in If You Use Dynamics CRM Online
If you have Dynamics CRM Online or are an implementer of Dynamics CRM Online you might want to follow this new blog that has just been started by the product team.
I just wanted to drop a quick note that the Dynamics CRM Online Blog is now live: https://community.dynamics.
Have a great day!
Wednesday, August 8, 2012
Query Audit Data in Microsoft Dynamics CRM 2011 to Determine When A User Last Logged In
This example will show you how to Query audit data in .NET (C#) and Jscript to determine when a user last logged in to the system.
Important Notes: The way access auditing currently works in CRM it will only record access to the system every 4 hours for someone. So you can tell when someone logged in, but you won't be able to tell when they logged in again unless the subsequent login was more than four hours later. Also, access auditing wasn't added to CRM 2011 until Update Rollup 5. So you need to have CRM Online or On-Premise with at least Update Rollup 5 installed to use access auditing.
C# Example:
Now in J-SCRIPT :
Now you can call this jscript from a webresource by calling SDK.SAMPLES.GetUserLastLoggedIn() All you should need to change (pass in) with this particular call would be the guid of the user you want to get the last access record for.
- I hope this helps
-
Important Notes: The way access auditing currently works in CRM it will only record access to the system every 4 hours for someone. So you can tell when someone logged in, but you won't be able to tell when they logged in again unless the subsequent login was more than four hours later. Also, access auditing wasn't added to CRM 2011 until Update Rollup 5. So you need to have CRM Online or On-Premise with at least Update Rollup 5 installed to use access auditing.
C# Example:
RetrieveMultipleRequest rmr = new RetrieveMultipleRequest();
RetrieveMultipleResponse resp = new RetrieveMultipleResponse();
SystemUser wr = new SystemUser();
QueryExpression query = new QueryExpression()
{
EntityName = "audit",
ColumnSet = new ColumnSet(true),
Criteria = new FilterExpression
{
FilterOperator = LogicalOperator.And,
Conditions =
{
new ConditionExpression
{
AttributeName = "operation",
Operator = ConditionOperator.Equal,
Values = { 4 } //access
},
new ConditionExpression
{
AttributeName = "objectid",
Operator = ConditionOperator.Equal,
Values = { "6e219f51-0310-4c4d-8c60-1c524e2ba7b3" } //my user id
}
//
}
},
Orders =
{
new OrderExpression
{
AttributeName = "createdon",
OrderType = OrderType.Descending
}
}
};
rmr.Query = query;
resp = (RetrieveMultipleResponse)slos.Execute(rmr);
Now in J-SCRIPT :
if (typeof (SDK) == "undefined")
{ SDK = { __namespace: true }; }
//This will establish a more unique namespace for functions in this library. This will reduce the
// potential for functions to be overwritten due to a duplicate name when the library is loaded.
SDK.SAMPLES = {
_getServerUrl: function () {
///<summary>
/// Returns the URL for the SOAP endpoint using the context information available in the form
/// or HTML Web resource.
///</summary>
var ServicePath = "/XRMServices/2011/Organization.svc/web";
var serverUrl = "";
if (typeof GetGlobalContext == "function") {
var context = GetGlobalContext();
serverUrl = context.getServerUrl();
}
else {
if (typeof Xrm.Page.context == "object") {
serverUrl = Xrm.Page.context.getServerUrl();
}
else
{ throw new Error("Unable to access the server URL"); }
}
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}
return serverUrl + ServicePath;
},
GetUserLastLoggedInRequest: function () {
var requestMain = ""
requestMain += "<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">";
requestMain += " <s:Body>";
requestMain += " <Execute xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">";
requestMain += " <request i:type=\"a:RetrieveMultipleRequest\" xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\">";
requestMain += " <a:Parameters xmlns:b=\"http://schemas.datacontract.org/2004/07/System.Collections.Generic\">";
requestMain += " <a:KeyValuePairOfstringanyType>";
requestMain += " <b:key>Query</b:key>";
requestMain += " <b:value i:type=\"a:QueryExpression\">";
requestMain += " <a:ColumnSet>";
requestMain += " <a:AllColumns>true</a:AllColumns>";
requestMain += " <a:Columns xmlns:c=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\" />";
requestMain += " </a:ColumnSet>";
requestMain += " <a:Criteria>";
requestMain += " <a:Conditions>";
requestMain += " <a:ConditionExpression>";
requestMain += " <a:AttributeName>operation</a:AttributeName>";
requestMain += " <a:Operator>Equal</a:Operator>";
requestMain += " <a:Values xmlns:c=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">";
requestMain += " <c:anyType i:type=\"d:int\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\">4</c:anyType>";
requestMain += " </a:Values>";
requestMain += " </a:ConditionExpression>";
requestMain += " <a:ConditionExpression>";
requestMain += " <a:AttributeName>objectid</a:AttributeName>";
requestMain += " <a:Operator>Equal</a:Operator>";
requestMain += " <a:Values xmlns:c=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">";
requestMain += " <c:anyType i:type=\"d:string\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\">6e219f51-0310-4c4d-8c60-1c524e2ba7b3</c:anyType>";
requestMain += " </a:Values>";
requestMain += " </a:ConditionExpression>";
requestMain += " </a:Conditions>";
requestMain += " <a:FilterOperator>And</a:FilterOperator>";
requestMain += " <a:Filters />";
requestMain += " </a:Criteria>";
requestMain += " <a:Distinct>false</a:Distinct>";
requestMain += " <a:EntityName>audit</a:EntityName>";
requestMain += " <a:LinkEntities />";
requestMain += " <a:Orders>";
requestMain += " <a:OrderExpression>";
requestMain += " <a:AttributeName>createdon</a:AttributeName>";
requestMain += " <a:OrderType>Descending</a:OrderType>";
requestMain += " </a:OrderExpression>";
requestMain += " </a:Orders>";
requestMain += " <a:PageInfo>";
requestMain += " <a:Count>0</a:Count>";
requestMain += " <a:PageNumber>0</a:PageNumber>";
requestMain += " <a:PagingCookie i:nil=\"true\" />";
requestMain += " <a:ReturnTotalRecordCount>false</a:ReturnTotalRecordCount>";
requestMain += " </a:PageInfo>";
requestMain += " <a:NoLock>false</a:NoLock>";
requestMain += " </b:value>";
requestMain += " </a:KeyValuePairOfstringanyType>";
requestMain += " </a:Parameters>";
requestMain += " <a:RequestId i:nil=\"true\" />";
requestMain += " <a:RequestName>RetrieveMultiple</a:RequestName>";
requestMain += " </request>";
requestMain += " </Execute>";
requestMain += " </s:Body>";
requestMain += "</s:Envelope>";
var req = new XMLHttpRequest();
req.open("POST", SDK.SAMPLES._getServerUrl(), false)
req.setRequestHeader("Accept", "application/xml, text/xml, */*");
req.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
req.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
req.send(requestMain);
//work with the response here
//var strResponse = req.responseXML.xml;
//alert(strResponse.toString());
},
__namespace: true
};
Now you can call this jscript from a webresource by calling SDK.SAMPLES.GetUserLastLoggedIn() All you should need to change (pass in) with this particular call would be the guid of the user you want to get the last access record for.
- I hope this helps
-
Tuesday, August 7, 2012
Stay on Top of Other Technologies - Great Rollup by UK PFE Team
As an MVP, or a technologist in general, it is important to stay on top of other technologies other than just your break and butter. The UK Premier Team put out this awesome rollup that is definitely worth a look if you are wondering what is going on in other areas of the Microsoft technology stack.
The UK PFE team has a blog. Check it out: http://blogs.technet.com/b/
|
|
tmg-services-stopping-
ee907407.aspx
06/28/when-configuring-the-
articles/tags/tmg/default.aspx
articles/tags/UAG/default.aspx
articles/6458.microsoft-
articles/tags/UAG/default.aspx
archive/2012/07/18/windows-8-
30182
29854
29039
7826
30341
30342
30183
30002
monthview.aspx
default.mspx
Windows 7 Enterprise: Print Job Fails to Print when Printed from WPF Application to XPS Printer Pool
kb/2733143/en-US
|
07/03/june-2012-cu-for-
07/17/office-and-sharepoint-
07/19/developer-trainings-for-
TWC9-July-20-2012
sharepoint-2013-links-
kb/2596942
kb/2728313
kb/2732019
kb/2716884
kb/2598239
kb/2553424
kb/2553194
|
2012/07/26/sql-server-2008-r2-
2012/07/24/check-out-the-
2012/07/12/microsoft-
2012/07/11/microsoft-and-dell-
2012/06/14/hy-vee-boosts-
2012/06/13/new-sql-services-
4978-AA76-89113AE58493/
|
establishing-exchange-content-
remote-connectivity-analyzer-
crazy-about-dogfood-and-
everything-you-need-to-know-
announcing-a-licensing-change-
the-new-exchange.aspx
microsoft-security-advisory-
update-on-multi-mailbox-
dirsync-database-keeps-on-
teched-europe-2012-lync-
lync-firewall-rules-viewer.
how-to-troubleshoot-sign-in-
lync-online-presentation-tips-
get-the-new-office-preview.
integrating-exchange-2013-
lync-online-previews-get-the-
update-client-virtualization-
updates-to-the-lync-server-
familyid=9587db25-13c4-4e90-
familyid=6fa94dc9-d4b6-402b-
familyid=a9aae935-ad23-4117-
familyid=ad3921fb-8224-4681-
30391
30337
30338
familyid=5e94ad07-902c-422f-
familyid=e7a23d42-0835-440f-
familyid=e7a23d42-0835-440f-
familyid=ff200152-cdb0-4e88-
30349
30350
30351
us/download/details.aspx?id=
30352
30330
familyid=7938423f-f99e-4130-
familyid=406fc4ba-cdd4-4dfc-
28786
24677
21305
Subscribe to:
Posts (Atom)