Produced by Araxis Merge on 2/1/2017 2:57:02 PM Eastern Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | C:\Araxis_Merge_Comprasion\Pub_un\BTSSS_CIF_122016.zip\BTSSS_CIF_12_20_16\clean\CRM\trunk\SDK\SampleCode\JS\SOAPForJScript\SOAPForJScript | AssignTest.htm | Tue Dec 20 19:51:48 2016 UTC |
| 2 | Wed Feb 1 19:57:02 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 1 | 175 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | <!DOCTYPE html PUBLI C "-//W3C/ /DTD XHTML 1.0 Trans itional//E N" "http:/ /www.w3.or g/TR/xhtml 1/DTD/xhtm l1-transit ional.dtd" > | |||||
| 2 | <!-- | |||||
| 3 | ========== ========== ========== ========== ========== ========== ========= | |||||
| 4 | This file is part of the Micro soft Dynam ics CRM SD K code sam ples. | |||||
| 5 | ||||||
| 6 | Copyright (C) Micros oft Corpor ation. Al l rights r eserved. | |||||
| 7 | ||||||
| 8 | This sourc e code is intended o nly as a s upplement to Microso ft | |||||
| 9 | Developmen t Tools an d/or on-li ne documen tation. S ee these o ther | |||||
| 10 | materials for detail ed informa tion regar ding Micro soft code samples. | |||||
| 11 | ||||||
| 12 | THIS CODE AND INFORM ATION ARE PROVIDED " AS IS" WIT HOUT WARRA NTY OF ANY | |||||
| 13 | KIND, EITH ER EXPRESS ED OR IMPL IED, INCLU DING BUT N OT LIMITED TO THE | |||||
| 14 | IMPLIED WA RRANTIES O F MERCHANT ABILITY AN D/OR FITNE SS FOR A | |||||
| 15 | PARTICULAR PURPOSE. | |||||
| 16 | ========== ========== ========== ========== ========== ========== ========= | |||||
| 17 | --> | |||||
| 18 | <!--<snipp etAssignTe st>--> | |||||
| 19 | <html xmln s="http:// www.w3.org /1999/xhtm l"> | |||||
| 20 | <head> | |||||
| 21 | <title>As sign Test< /title> | |||||
| 22 | <meta htt p-equiv="X -UA-Compat ible" cont ent="IE=ed ge" /> | |||||
| 23 | <script src="../Cl ientGlobal Context.js .aspx" typ e="text/ja vascript"> </script> | |||||
| 24 | <script s rc="Script s/SDK.REST .js" type= "text/java script"></ script> | |||||
| 25 | <script s rc="Script s/SDK.SOAP Sample.Ass ign.js" ty pe="text/j avascript" ></script> | |||||
| 26 | <script t ype="text/ javascript "> | |||||
| 27 | var resu ltsArea = null; | |||||
| 28 | var user id; | |||||
| 29 | var acco untid; | |||||
| 30 | var user Lookup; | |||||
| 31 | var acco untLookup; | |||||
| 32 | var acco untsToShow = 10; | |||||
| 33 | var user sToShow = 10; | |||||
| 34 | var user s = []; | |||||
| 35 | var acco unts = []; | |||||
| 36 | ||||||
| 37 | document .onreadyst atechange = function () { | |||||
| 38 | ///<sum mary> | |||||
| 39 | /// Ini tializes t he sample when the d ocument is ready | |||||
| 40 | ///</su mmary> | |||||
| 41 | if (doc ument.read yState == "complete" ) { | |||||
| 42 | userid = documen t.getEleme ntById("us erid"); | |||||
| 43 | accoun tid = docu ment.getEl ementById( "accountid "); | |||||
| 44 | result sArea = do cument.get ElementByI d("results "); | |||||
| 45 | userLo okup = doc ument.getE lementById ("userLook up"); | |||||
| 46 | accoun tLookup = document.g etElementB yId("accou ntLookup") ; | |||||
| 47 | ||||||
| 48 | popula teUserLook up(); | |||||
| 49 | popula teAccountL ookup(); | |||||
| 50 | ||||||
| 51 | } | |||||
| 52 | } | |||||
| 53 | ||||||
| 54 | function testAssig n() { | |||||
| 55 | //The f ield to en ter the us er id of t he person the accoun t record s hould be a ssigned to . | |||||
| 56 | userid. value; | |||||
| 57 | // The field to e nter the a ccount id of the acc ount recor d to assig n to the u ser | |||||
| 58 | account id.value; | |||||
| 59 | // Sinc e the resp onse does not includ e any data to parse, simply di splay a su ccess mess age. | |||||
| 60 | var suc cessCallba ck = funct ion () { s etText(res ultsArea, "Success!" ); }; | |||||
| 61 | // Disp lay the er ror from t he message passed ba ck from th e response . | |||||
| 62 | var err orCallback = functio n (error) { setText( resultsAre a,"errorCa llback err or: "+erro r.message) ; }; | |||||
| 63 | // Call the funct ion | |||||
| 64 | try { | |||||
| 65 | SDK.SO APSamples. assignRequ est(userid .value, ac countid.va lue, "acco unt", succ essCallbac k, errorCa llback); | |||||
| 66 | } | |||||
| 67 | catch ( e) { | |||||
| 68 | setTex t(resultsA rea, e.mes sage); | |||||
| 69 | } | |||||
| 70 | ||||||
| 71 | } | |||||
| 72 | ||||||
| 73 | function populateU serLookup( ) { | |||||
| 74 | SDK.RES T.retrieve MultipleRe cords("Sys temUser", | |||||
| 75 | "$top=" + usersTo Show + "&$ select=Ful lName,Syst emUserId&$ filter=Ful lName ne ' INTEGRATIO N' and Ful lName ne ' SYSTEM'", | |||||
| 76 | functio n (results ) { | |||||
| 77 | for (v ar i = 0; i < result s.length; i++) { | |||||
| 78 | users .push(resu lts[i]); | |||||
| 79 | } | |||||
| 80 | }, | |||||
| 81 | functio n (error) { | |||||
| 82 | alert( error.mess age); | |||||
| 83 | }, | |||||
| 84 | functio n () { | |||||
| 85 | for (v ar i = 0; i < users. length; i+ +) { | |||||
| 86 | var u ser = user s[i]; | |||||
| 87 | userL ookup.opti ons[i] = n ew Option( user.FullN ame, user. SystemUser Id); | |||||
| 88 | } | |||||
| 89 | userid .value = u serLookup. options[0] .value; | |||||
| 90 | ||||||
| 91 | userLo okup.oncha nge = func tion () { | |||||
| 92 | useri d.value = userLookup .options[u serLookup. selectedIn dex].value ; | |||||
| 93 | clear Message(); | |||||
| 94 | }; | |||||
| 95 | ||||||
| 96 | }); | |||||
| 97 | } | |||||
| 98 | ||||||
| 99 | function populateA ccountLook up() { | |||||
| 100 | SDK.RES T.retrieve MultipleRe cords("Acc ount", | |||||
| 101 | "$top= " + accoun tsToShow + "&$select =AccountId ,Name,Owne rId", | |||||
| 102 | functio n (results ) { | |||||
| 103 | for (v ar i = 0; i < result s.length; i++) { | |||||
| 104 | accou nts.push(r esults[i]) ; | |||||
| 105 | ||||||
| 106 | } | |||||
| 107 | }, | |||||
| 108 | functio n (error) { | |||||
| 109 | alert( error.mess age); | |||||
| 110 | }, | |||||
| 111 | functio n () { | |||||
| 112 | for (v ar i = 0; i < accoun ts.length; i++) { | |||||
| 113 | var a ccount = a ccounts[i] ; | |||||
| 114 | accou ntLookup.o ptions[i] = new Opti on(account .Name + " : " + acco unt.OwnerI d.Name, ac count.Acco untId); | |||||
| 115 | ||||||
| 116 | } | |||||
| 117 | accoun tid.value = accountL ookup.opti ons[0].val ue; | |||||
| 118 | ||||||
| 119 | accoun tLookup.on change = f unction () { | |||||
| 120 | accou ntid.value = account Lookup.opt ions[accou ntLookup.s electedInd ex].value; | |||||
| 121 | clear Message(); | |||||
| 122 | }; | |||||
| 123 | }); | |||||
| 124 | } | |||||
| 125 | ||||||
| 126 | function clearMess age() { | |||||
| 127 | setText (resultsAr ea, ""); | |||||
| 128 | } | |||||
| 129 | ||||||
| 130 | function setText(e lement, te xt) { | |||||
| 131 | if (typ eof (eleme nt.innerTe xt) != "un defined") { | |||||
| 132 | elemen t.innerTex t = text; | |||||
| 133 | } | |||||
| 134 | else { | |||||
| 135 | elemen t.textCont ent = text ; | |||||
| 136 | } | |||||
| 137 | ||||||
| 138 | } | |||||
| 139 | ||||||
| 140 | </script> | |||||
| 141 | </head> | |||||
| 142 | <body> | |||||
| 143 | <table> | |||||
| 144 | <tr> | |||||
| 145 | <td> | |||||
| 146 | <label for="user id"> | |||||
| 147 | Syste mUserId:</ label> | |||||
| 148 | </td> | |||||
| 149 | <td> | |||||
| 150 | <input id="useri d" type="t ext" style ="width:27 0px;" /> | |||||
| 151 | </td> | |||||
| 152 | <td> | |||||
| 153 | <select id="userL ookup"></s elect> | |||||
| 154 | </td> | |||||
| 155 | </tr> | |||||
| 156 | <tr> | |||||
| 157 | <td> | |||||
| 158 | <label for="acco untid"> | |||||
| 159 | Accou ntId:</lab el> | |||||
| 160 | </td> | |||||
| 161 | <td> | |||||
| 162 | <input id="accou ntid" type ="text" st yle="width :270px;" / > | |||||
| 163 | </td> | |||||
| 164 | <td> | |||||
| 165 | <select id="accou ntLookup"> </select> | |||||
| 166 | </td> | |||||
| 167 | </tr> | |||||
| 168 | </table> | |||||
| 169 | <button i d="testAss ign" title ="Click th is button to test th e testAssi gn functio n." onclic k="testAss ign();"> | |||||
| 170 | Test Ass ign</butto n> | |||||
| 171 | <div id=" results"> | |||||
| 172 | </ div> | |||||
| 173 | </body> | |||||
| 174 | </html> | |||||
| 175 | <!--</snip petAssignT est>--> |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.