Produced by Araxis Merge on 12/4/2017 8:32:29 AM Central 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 | VCCM.zip\VCCM\CRM_solutions\FTPResources\FTPResources_3_35.zip\WebResources | ftp_ServConnDisabilitiesGridjsServConnDisabilities85656E49-0BE6-E511-9430-0050568D743D | Thu Nov 17 16:48:12 2016 UTC |
| 2 | VCCM.zip\VCCM\CRM_solutions\FTPResources\FTPResources_3_35.zip\WebResources | ftp_ServConnDisabilitiesGridjsServConnDisabilities85656E49-0BE6-E511-9430-0050568D743D | Thu Nov 30 16:21:42 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 842 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 | /// <refer ence path= '../../tri ipcrm_/TR_ KU_V2015_2 _902/js/jq uery.min.j s' /> | |
| 2 | /// <refer ence path= '../../tri ipcrm_/TR_ KU_V2015_2 _902/js/ke ndo.all.mi n.js' /> | |
| 3 | /// <refer ence path= "SampleXml Data.js" / > | |
| 4 | ||
| 5 | //ServConn Disabiliti esGridScri ptLib.js | |
| 6 | //Contains variables and funct ions used by the Ser vConnDisab ilitiesGri d.html pag e | |
| 7 | ||
| 8 | //Static V ariables | |
| 9 | var scdg_c rmOdataEnd Point = '/ XRMService s/2011/Org anizationD ata.svc'; | |
| 10 | var scdg_c ontext = G etGlobalCo ntext(); | |
| 11 | var scdg_s erverUrl = scdg_cont ext.getCli entUrl(); | |
| 12 | ||
| 13 | //var scdg _eesummary URLbase = 'https://q acrmdac.np .crm.vrm.v ba. DNS /WebParts/ api/eesumm ary/1.0/xm l/ftpCRM/' ; //OLD MANU AL DEV URL | |
| 14 | var scdg_e esummaryUR Lbase = '' ; | |
| 15 | ||
| 16 | function s cdg_getQue ryVariable (scdg_vari able) { | |
| 17 | try { | |
| 18 | // Get a Quer y Variable | |
| 19 | va r scdg_que ry = windo w.location .search.su bstring(1) ; | |
| 20 | va r scdg_var s = scdg_q uery.split ('&'); | |
| 21 | fo r (var i = 0; i < sc dg_vars.le ngth; i++) { | |
| 22 | var scdg _pair = sc dg_vars[i] .split('=' ); | |
| 23 | if (scdg _pair[0] = = scdg_var iable) { | |
| 24 | retu rn scdg_pa ir[1]; | |
| 25 | } | |
| 26 | } | |
| 27 | // alert('A r equired Qu ery Variab le: ' + sc dg_variabl e + ' is m issing!'); | |
| 28 | re turn ''; | |
| 29 | } | |
| 30 | catch (err) { | |
| 31 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_getQue ryVariable ): " + err .message); | |
| 32 | } | |
| 33 | } | |
| 34 | ||
| 35 | function s cdg_Settin gsWebServi ceURL_resp onse(scdg_ settingDat a, scdg_la stSkip, sc dg_eesumma ryURLbase_ NA) { | |
| 36 | try { | |
| 37 | // scdg_lastS kip is the starting point in t he result (use if mo re than 50 records) //Not used in this s cenario | |
| 38 | va r scdg_Dac Url = null ; | |
| 39 | va r scdg_ees ummaryApiU rl = null; | |
| 40 | fo r (var i = 0; i <= s cdg_settin gData.d.re sults.leng th - 1; i+ +) { | |
| 41 | //Get in fo | |
| 42 | if (scdg _settingDa ta.d.resul ts[i].ftp_ DACURL != null) { sc dg_DacUrl = scdg_set tingData.d .results[i ].ftp_DACU RL; } | |
| 43 | if (scdg _settingDa ta.d.resul ts[i].ftp_ ESRAPIURL != null) { scdg_eesu mmaryApiUr l = scdg_s ettingData .d.results [i].ftp_ES RAPIURL; } | |
| 44 | break; | |
| 45 | } | |
| 46 | if (scdg_Dac Url != nul l && scdg_ eesummaryA piUrl != n ull) { | |
| 47 | //Constr uct full w eb service URL | |
| 48 | scdg_ees ummaryURLb ase = scdg _DacUrl + scdg_eesum maryApiUrl ; | |
| 49 | //Contin ue with Gr id Build | |
| 50 | scdg_Bui ldGrid(); | |
| 51 | } | |
| 52 | el se { | |
| 53 | alert("E RROR: THE EESUMMARY WEB SERVIC E URL IS M ISSING, PL EASE CONTA CT TECHNIC AL SUPPORT !"); | |
| 54 | } | |
| 55 | } | |
| 56 | catch (err) { | |
| 57 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_Settin gsWebServi ceURL_resp onse): " + err.messa ge); | |
| 58 | } | |
| 59 | } | |
| 60 | ||
| 61 | function s cdg_getDis abilityDat a(scdg_nat ionalId) { | |
| 62 | try { | |
| 63 | va r scdg_ees ummaryURL = scdg_ees ummaryURLb ase + '000 000' + scd g_national Id + '0000 00'; | |
| 64 | va r scdg_xml Data = nul l; | |
| 65 | ||
| 66 | $. ajax({ | |
| 67 | type: "G ET", | |
| 68 | url: scd g_eesummar yURL, | |
| 69 | contentT ype: "appl ication/xm l; charset =utf-8", | |
| 70 | dataType : "text", | |
| 71 | success: function (xmlTextda ta) { | |
| 72 | scdg _xmlData = xmlTextda ta; | |
| 73 | }, | |
| 74 | error: f unction (j qXHR, text Status, er rorThrown) { | |
| 75 | //Sy stem Error | |
| 76 | scdg _xmlData = null; | |
| 77 | }, | |
| 78 | async: f alse, | |
| 79 | cache: f alse | |
| 80 | }) ; | |
| 81 | re turn scdg_ xmlData; | |
| 82 | } | |
| 83 | catch (err) { | |
| 84 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_getDis abilityDat a): " + er r.message) ; | |
| 85 | re turn null; | |
| 86 | } | |
| 87 | } | |
| 88 | ||
| 89 | function s cdg_FormLo ad() { | |
| 90 | try { | |
| 91 | // GET CRM SE TTINGS WEB SERVICE U RLS | |
| 92 | va r scdg_con ditionalFi lter = "(m cs_name eq 'Active S ettings')" ; | |
| 93 | sc dg_getMult ipleEntity DataAsync( 'mcs_setti ngSet', 'f tp_DACURL, ftp_ESRAP IURL', scd g_conditio nalFilter, 'mcs_name ', 'asc', 0, scdg_Se ttingsWebS erviceURL_ response, scdg_eesum maryURLbas e); | |
| 94 | } | |
| 95 | catch (err) { | |
| 96 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_FormLo ad): " + e rr.message ); | |
| 97 | } | |
| 98 | } | |
| 99 | ||
| 100 | function s cdg_BuildG rid() { | |
| 101 | try { | |
| 102 | // Get the pa ssed natio nalid vari able | |
| 103 | va r scdg_xrm data = scd g_getQuery Variable(" data"); | |
| 104 | // alert('Xrm Data: ' + scdg_xrmda ta); | |
| 105 | if (scdg_xrm data == nu ll || scdg _xrmdata = = '') { re turn false ; } | |
| 106 | ||
| 107 | // Get the se rvice conn ected disa bilities d ata from t he web ser vice | |
| 108 | va r scdg_dis abilitiesX mlData = s cdg_getDis abilityDat a(scdg_xrm data); | |
| 109 | ||
| 110 | // Temporary action: xm l result i s empty, u se sample data | |
| 111 | // ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******** | |
| 112 | // if (scdg_d isabilitie sXmlData = = null || scdg_disab ilitiesXml Data == '' ) { scdg_d isabilitie sXmlData = xml_resul ts3; } | |
| 113 | // ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******** | |
| 114 | ||
| 115 | // Define Gri ds | |
| 116 | // Define the main grid | |
| 117 | $( '#ku_disab ilitygrid' ).kendoGri d({ | |
| 118 | columns: [ | |
| 119 | { fi eld: 'ID', type: 'st ring', hid den: true }, | |
| 120 | { fi eld: 'type ', title: 'Eligibili ty', type: 'string'} , | |
| 121 | { fi eld: 'enro llmentCate goryName', title: 'S tatus', ty pe: 'strin g'}, | |
| 122 | { fi eld: 'rate dDisabilit yPercentag eTotal', t itle: 'SC% (total)', type: 'st ring'}, | |
| 123 | { fi eld: 'envC ontaminant sInd', tit le: 'Envir onmental C ontaminant ', type: ' string'}, | |
| 124 | { fi eld: 'radi ationExpos ureInd', t itle: 'Rad iation Exp osure', ty pe: 'strin g'}, | |
| 125 | { fi eld: 'agen tOrangeInd ', title: 'Agent Ora nge', type : 'string' }, | |
| 126 | { fi eld: 'camp LejeuneInd ', title: 'Camp Leje une', type : 'string' }, | |
| 127 | { fi eld: 'diag nosedWithC ancer', ti tle: 'Head /Neck Canc er', type: 'string'} , | |
| 128 | { fi eld: 'mili tarySexual Trauma', t itle: 'Mil itary Sexu al Trauma' , type: 's tring'}, | |
| 129 | { fi eld: 'comb atVeteran' , title: ' Combat Vet eran', typ e: 'string '}, | |
| 130 | { fi eld: 'shad Indicator' , title: ' Shipboard Hazard & D efense', t ype: 'stri ng'} | |
| 131 | ], | |
| 132 | dataSour ce: { | |
| 133 | sche ma: { | |
| 134 | model: { | |
| 135 | id: 'I D' | |
| 136 | } | |
| 137 | } | |
| 138 | }, | |
| 139 | groupabl e: false, | |
| 140 | sortable : false, | |
| 141 | editable : false, | |
| 142 | height: 130, | |
| 143 | resizabl e: true, | |
| 144 | navigata ble: true, | |
| 145 | selectab le: false, | |
| 146 | noRecord s: true | |
| 147 | }) ; | |
| 148 | // Define the detail gr id | |
| 149 | $( '#ku_disab ilitydetai lgrid').ke ndoGrid({ | |
| 150 | columns: [ | |
| 151 | { fi eld: 'ID', type: 'st ring', hid den: true }, | |
| 152 | { fi eld: 'disa bility', t itle: 'Ind ividual Di sability', type: 'st ring'}, | |
| 153 | { fi eld: 'perc entage', t itle: 'SC% ', type: ' string'} | |
| 154 | ], | |
| 155 | dataSour ce: { | |
| 156 | sche ma: { | |
| 157 | model: { | |
| 158 | id: 'I D' | |
| 159 | } | |
| 160 | } | |
| 161 | }, | |
| 162 | groupabl e: false, | |
| 163 | sortable : false, | |
| 164 | editable : false, | |
| 165 | height: 200, | |
| 166 | resizabl e: true, | |
| 167 | navigata ble: true, | |
| 168 | selectab le: false, | |
| 169 | noRecord s: true | |
| 170 | }) ; | |
| 171 | ||
| 172 | // Create dis abilty gri d datasour ce | |
| 173 | va r scdg_dis abilityGri d = $('#ku _disabilit ygrid').da ta('kendoG rid'); | |
| 174 | // Create dis abilty det ail grid d atasource | |
| 175 | va r scdg_dis abilitydet ailGrid = $('#ku_dis abilitydet ailgrid'). data('kend oGrid'); | |
| 176 | ||
| 177 | // Search XML values | |
| 178 | sc dg_xmlDoc = $.parseX ML(scdg_di sabilities XmlData); | |
| 179 | $s cdg_xml = $(scdg_xml Doc); | |
| 180 | ||
| 181 | // Data from parentnode 'enrollme ntDetermin ationInfo' | |
| 182 | va r $scdg_en rollmentDe terminatio nInfo = nu ll; | |
| 183 | va r $scdg_pr imaryEligi bility = n ull; | |
| 184 | va r $scdg_ty pe = null; | |
| 185 | va r scdg_typ eText = nu ll; | |
| 186 | va r $scdg_en rollmentCa tegoryName = null; | |
| 187 | va r scdg_enr ollmentCat egoryNameT ext = null ; | |
| 188 | va r $scdg_sp ecialFacto rs = null; | |
| 189 | va r $scdg_en vContamina ntsInd = n ull; | |
| 190 | va r scdg_env Contaminan tsIndText = null; | |
| 191 | va r $scdg_ra diationExp osureInd = null; | |
| 192 | va r scdg_rad iationExpo sureIndTex t = null; | |
| 193 | va r $scdg_ag entOrangeI nd = null; | |
| 194 | va r scdg_age ntOrangeIn dText = nu ll; | |
| 195 | va r $scdg_ca mpLejeuneI nd = null; | |
| 196 | va r scdg_cam pLejeuneIn dText = nu ll; | |
| 197 | va r $scdg_se rviceConne ctionAward = null; | |
| 198 | va r $scdg_se rviceConne ctedPercen tage = nul l; | |
| 199 | va r scdg_ser viceConnec tedPercent ageText = null; | |
| 200 | va r $scdg_ra tedDisabil ities = nu ll; | |
| 201 | ||
| 202 | va r $scdg_ag entOrangeL ocation = null; | |
| 203 | va r scdg_age ntOrangeLo cationText = null; | |
| 204 | va r $scdg_ra diationExp osureMetho d = null; | |
| 205 | va r scdg_rad iationExpo sureMethod Text = nul l; | |
| 206 | ||
| 207 | va r $scdg_no seThroatRa diumInfo = null; | |
| 208 | va r $scdg_di agnosedWit hCancer = null; | |
| 209 | va r scdg_dia gnosedWith CancerText = null; | |
| 210 | ||
| 211 | va r $scdg_mi litarySexu alTraumaIn fo = null; | |
| 212 | va r $scdg_mi lSexTrauma Status = n ull; | |
| 213 | va r scdg_mil SexTraumaS tatusText = null; | |
| 214 | ||
| 215 | // Data from parentnode 'military ServiceInf o' | |
| 216 | va r $scdg_mi litaryServ iceInfo = null; | |
| 217 | va r $scdg_co mbatVetera nEligibili tyEndDate = null; | |
| 218 | va r scdg_com batVeteran Eligibilit yEndDateTe xt = null; | |
| 219 | va r $scdg_sh adIndicato r = null; | |
| 220 | va r scdg_sha dIndicator Text = nul l; | |
| 221 | ||
| 222 | va r scdg_rat edDisabili tyPercenta geTotal = 0; | |
| 223 | ||
| 224 | va r scdg_det ailrowcoun t = 0; | |
| 225 | ||
| 226 | $s cdg_enroll mentDeterm inationInf o = $scdg_ xml.find(' enrollment Determinat ionInfo'); | |
| 227 | if ($scdg_en rollmentDe terminatio nInfo != n ull) { | |
| 228 | $scdg_pr imaryEligi bility = $ scdg_enrol lmentDeter minationIn fo.find('p rimaryElig ibility'); | |
| 229 | if ($scd g_primaryE ligibility != null) { | |
| 230 | $scd g_type = $ scdg_prima ryEligibil ity.find(' type'); | |
| 231 | if ( $scdg_type != null) { scdg_typ eText = $s cdg_type.t ext(); } | |
| 232 | } | |
| 233 | ||
| 234 | $scdg_en rollmentCa tegoryName = $scdg_e nrollmentD eterminati onInfo.fin d('enrollm entCategor yName'); | |
| 235 | if ($scd g_enrollme ntCategory Name != nu ll) { scdg _enrollmen tCategoryN ameText = $scdg_enro llmentCate goryName.t ext(); } | |
| 236 | ||
| 237 | $scdg_sp ecialFacto rs = $scdg _enrollmen tDetermina tionInfo.f ind('speci alFactors' ); | |
| 238 | if ($scd g_specialF actors != null) { | |
| 239 | $scd g_envConta minantsInd = $scdg_s pecialFact ors.find(' envContami nantsInd') ; | |
| 240 | if ( $scdg_envC ontaminant sInd != nu ll) { scdg _envContam inantsIndT ext = $scd g_envConta minantsInd .text(); } | |
| 241 | $scd g_radiatio nExposureI nd = $scdg _specialFa ctors.find ('radiatio nExposureI nd'); | |
| 242 | if ( $scdg_radi ationExpos ureInd != null) { sc dg_radiati onExposure IndText = $scdg_radi ationExpos ureInd.tex t(); } | |
| 243 | $scd g_agentOra ngeInd = $ scdg_speci alFactors. find('agen tOrangeInd '); | |
| 244 | if ( $scdg_agen tOrangeInd != null) { scdg_age ntOrangeIn dText = $s cdg_agentO rangeInd.t ext(); } | |
| 245 | $scd g_campLeje uneInd = $ scdg_speci alFactors. find('camp LejeuneInd '); | |
| 246 | if ( $scdg_camp LejeuneInd != null) { scdg_cam pLejeuneIn dText = $s cdg_campLe jeuneInd.t ext(); } | |
| 247 | ||
| 248 | $scd g_agentOra ngeLocatio n = $scdg_ specialFac tors.find( 'agentOran geLocation '); | |
| 249 | if ( $scdg_agen tOrangeLoc ation != n ull) { scd g_agentOra ngeLocatio nText = $s cdg_agentO rangeLocat ion.text() ; } | |
| 250 | $scd g_radiatio nExposureM ethod = $s cdg_specia lFactors.f ind('radia tionExposu reMethod') ; | |
| 251 | if ( $scdg_radi ationExpos ureMethod != null) { scdg_radi ationExpos ureMethodT ext = $scd g_radiatio nExposureM ethod.text (); } | |
| 252 | } | |
| 253 | ||
| 254 | $scdg_se rviceConne ctionAward = $scdg_e nrollmentD eterminati onInfo.fin d('service Connection Award'); | |
| 255 | if ($scd g_serviceC onnectionA ward != nu ll) { | |
| 256 | $scd g_serviceC onnectedPe rcentage = $scdg_ser viceConnec tionAward. find('serv iceConnect edPercenta ge'); | |
| 257 | if ( $scdg_serv iceConnect edPercenta ge != null ) { scdg_s erviceConn ectedPerce ntageText = $scdg_se rviceConne ctedPercen tage.text( ); } | |
| 258 | $scd g_ratedDis abilities = $scdg_se rviceConne ctionAward .find('rat edDisabili ties'); | |
| 259 | //Ge t each dis ability li sted | |
| 260 | $scd g_ratedDis abilities. find('rate dDisabilit y').each(f unction () { | |
| 261 | var scdg_r atedDisabi lityPercen t = 0; | |
| 262 | var scdg_d isability = null; | |
| 263 | if (Number ($(this).f ind('perce ntage').te xt()) > 0) { | |
| 264 | scdg_r atedDisabi lityPercen tageTotal = scdg_rat edDisabili tyPercenta geTotal + Number($(t his).find( 'percentag e').text() ); | |
| 265 | scdg_r atedDisabi lityPercen t = Number ($(this).f ind('perce ntage').te xt()); | |
| 266 | } | |
| 267 | //Add to d etail grid | |
| 268 | scdg_detai lrowcount = scdg_det ailrowcoun t + 1; | |
| 269 | scdg_disab ilitydetai lGrid.data Source.pus hCreate({ | |
| 270 | ID: sc dg_detailr owcount, | |
| 271 | disabi lity: $(th is).find(' disability ').text(), | |
| 272 | percen tage: scdg _ratedDisa bilityPerc ent | |
| 273 | }); | |
| 274 | }); | |
| 275 | } | |
| 276 | ||
| 277 | $scdg_no seThroatRa diumInfo = $scdg_enr ollmentDet ermination Info.find( 'noseThroa tRadiumInf o'); | |
| 278 | if ($scd g_noseThro atRadiumIn fo != null ) { | |
| 279 | $scd g_diagnose dWithCance r = $scdg_ noseThroat RadiumInfo .find('dia gnosedWith Cancer'); | |
| 280 | if ( $scdg_diag nosedWithC ancer != n ull) { scd g_diagnose dWithCance rText = $s cdg_diagno sedWithCan cer.text() ; } | |
| 281 | } | |
| 282 | ||
| 283 | $scdg_mi litarySexu alTraumaIn fo = $scdg _enrollmen tDetermina tionInfo.f ind('milit arySexualT raumaInfo' ); | |
| 284 | if ($scd g_military SexualTrau maInfo != null) { | |
| 285 | $scd g_milSexTr aumaStatus = $scdg_m ilitarySex ualTraumaI nfo.find(' status'); | |
| 286 | if ( $scdg_milS exTraumaSt atus != nu ll) { scdg _milSexTra umaStatusT ext = $scd g_milSexTr aumaStatus .text(); } | |
| 287 | } | |
| 288 | ||
| 289 | } | |
| 290 | ||
| 291 | $s cdg_milita ryServiceI nfo = $scd g_xml.find ('military ServiceInf o'); | |
| 292 | if ($scdg_mi litaryServ iceInfo != null) { | |
| 293 | $scdg_co mbatVetera nEligibili tyEndDate = $scdg_mi litaryServ iceInfo.fi nd('combat VeteranEli gibilityEn dDate'); | |
| 294 | if ($scd g_combatVe teranEligi bilityEndD ate != nul l) { | |
| 295 | scdg _combatVet eranEligib ilityEndDa teText = s cdg_combat VeteranEli gibilityEn dDateText = $scdg_co mbatVetera nEligibili tyEndDate. text(); | |
| 296 | } | |
| 297 | $scdg_sh adIndicato r = $scdg_ militarySe rviceInfo. find('shad Indicator' ); | |
| 298 | if ($scd g_shadIndi cator != n ull) { scd g_shadIndi catorText = $scdg_sh adIndicato r.text(); } | |
| 299 | } | |
| 300 | ||
| 301 | // If no elig ibility sp ecified, s et to fals e | |
| 302 | if (scdg_typ eText == n ull || scd g_typeText == '') { scdg_typeT ext = fals e; } | |
| 303 | ||
| 304 | // Change boo lean value s to false if not ma rked true | |
| 305 | if (scdg_env Contaminan tsIndText != 'true') { scdg_en vContamina ntsIndText = false; } | |
| 306 | if (scdg_rad iationExpo sureIndTex t != 'true ') { scdg_ radiationE xposureInd Text = fal se; } | |
| 307 | if (scdg_age ntOrangeIn dText != ' true') { s cdg_agentO rangeIndTe xt = false ; } | |
| 308 | if (scdg_cam pLejeuneIn dText != ' true') { s cdg_campLe jeuneIndTe xt = false ; } | |
| 309 | ||
| 310 | if (scdg_dia gnosedWith CancerText != 'true' ) { scdg_d iagnosedWi thCancerTe xt = false ; } | |
| 311 | if (scdg_sha dIndicator Text != 't rue') { sc dg_shadInd icatorText = false; } | |
| 312 | ||
| 313 | // Change all True/Fals e to Yes/N o and Hide No column s | |
| 314 | if (scdg_typ eText == f alse) { sc dg_typeTex t = 'No'; } | |
| 315 | ||
| 316 | if (scdg_env Contaminan tsIndText == "true") { scdg_en vContamina ntsIndText = "Yes"; } else { s cdg_envCon taminantsI ndText = " No"; scdg_ disability Grid.hideC olumn("env Contaminan tsInd"); } | |
| 317 | if (scdg_rad iationExpo sureIndTex t == "true ") { | |
| 318 | scdg_rad iationExpo sureIndTex t = "Yes"; | |
| 319 | if (scdg _radiation ExposureMe thodText ! = null) { scdg_radia tionExposu reIndText = scdg_rad iationExpo sureIndTex t + " - " + scdg_rad iationExpo sureMethod Text; } | |
| 320 | } else { | |
| 321 | scdg_rad iationExpo sureIndTex t = "No"; scdg_disab ilityGrid. hideColumn ("radiatio nExposureI nd"); | |
| 322 | } | |
| 323 | if (scdg_age ntOrangeIn dText == " true") { | |
| 324 | scdg_age ntOrangeIn dText = "Y es"; | |
| 325 | if (scdg _agentOran geLocation Text != nu ll) { scdg _agentOran geIndText = scdg_age ntOrangeIn dText + " - " + scdg _agentOran geLocation Text; } | |
| 326 | } | |
| 327 | el se { | |
| 328 | scdg_age ntOrangeIn dText = "N o"; scdg_d isabilityG rid.hideCo lumn("agen tOrangeInd "); | |
| 329 | } | |
| 330 | if (scdg_cam pLejeuneIn dText == " true") { s cdg_campLe jeuneIndTe xt = "Yes" ; } else { scdg_camp LejeuneInd Text = "No "; scdg_di sabilityGr id.hideCol umn("campL ejeuneInd" ); } | |
| 331 | ||
| 332 | if (scdg_dia gnosedWith CancerText == "true" ) { scdg_d iagnosedWi thCancerTe xt = "Yes" ; } else { scdg_diag nosedWithC ancerText = "No"; sc dg_disabil ityGrid.hi deColumn(" diagnosedW ithCancer" ); } | |
| 333 | ||
| 334 | if (scdg_mil SexTraumaS tatusText == null || scdg_milS exTraumaSt atusText = ='') { scd g_disabili tyGrid.hid eColumn("m ilitarySex ualTrauma" ); } | |
| 335 | ||
| 336 | if (scdg_com batVeteran Eligibilit yEndDateTe xt != null && scdg_c ombatVeter anEligibil ityEndDate Text != '' ) { scdg_c ombatVeter anEligibil ityEndDate Text = 'Ye s'; } else { scdg_di sabilityGr id.hideCol umn("comba tVeteran") ; } | |
| 337 | ||
| 338 | if (scdg_sha dIndicator Text == "t rue") { sc dg_shadInd icatorText = "Yes"; } else { s cdg_shadIn dicatorTex t = "No"; scdg_disab ilityGrid. hideColumn ("shadIndi cator"); } | |
| 339 | ||
| 340 | // Update dis ability ma in grid da ta | |
| 341 | sc dg_disabil ityGrid.da taSource.p ushCreate( { | |
| 342 | ID: '01' , | |
| 343 | type: sc dg_typeTex t, | |
| 344 | enrollme ntCategory Name: scdg _enrollmen tCategoryN ameText, | |
| 345 | ratedDis abilityPer centageTot al: scdg_s erviceConn ectedPerce ntageText, | |
| 346 | envConta minantsInd : scdg_env Contaminan tsIndText, | |
| 347 | radiatio nExposureI nd: scdg_r adiationEx posureIndT ext, | |
| 348 | agentOra ngeInd: sc dg_agentOr angeIndTex t, | |
| 349 | campLeje uneInd: sc dg_campLej euneIndTex t, | |
| 350 | diagnose dWithCance r: scdg_di agnosedWit hCancerTex t, | |
| 351 | military SexualTrau ma: scdg_m ilSexTraum aStatusTex t, | |
| 352 | combatVe teran: scd g_combatVe teranEligi bilityEndD ateText, | |
| 353 | shadIndi cator: scd g_shadIndi catorText | |
| 354 | }) ; | |
| 355 | ||
| 356 | // Hide the d etails gri d if the S C% total = 0 | |
| 357 | if (scdg_rat edDisabili tyPercenta geTotal == 0 || scdg _ratedDisa bilityPerc entageTota l == null || scdg_ra tedDisabil ityPercent ageTotal = = '') { | |
| 358 | $('#ku_d isabilityd etailgrid' ).hide(); | |
| 359 | } | |
| 360 | ||
| 361 | } | |
| 362 | catch (err) { | |
| 363 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_BuildG rid): " + err.messag e); | |
| 364 | } | |
| 365 | } | |
| 366 | ||
| 367 | ||
| 368 | function s cdg_execut eCrmOdataG etRequest( scdg_jsonQ uery, scdg _aSync, sc dg_aSyncCa llback, sc dg_skipCou nt, scdg_o ptionArray ) { | |
| 369 | //This function executes a CRM Odata web servi ce call to retrieve Crm data | |
| 370 | //*scd g_jsonQuer y* - a pro perly form atted CRM Odata Quer y string ( required) | |
| 371 | //*scd g_aSync* - specify ' true' to e xecute asy nchronousl y otherwis e 'false' (required) | |
| 372 | //*scd g_aSyncCal lback* - s pecify the name of t he return function t o call upo n completi on (requir ed if scdg _aSync = t rue. Othe rwise '') | |
| 373 | //*scd g_skipCoun t* - Initi al setting is always '0', incr ements by 50 per CRM SDK Odata standards (required ) | |
| 374 | //*scd g_optionAr ray* - is an optiona l array or single va lue, that contains a dditional task speci fic variab les that c an be pass ed between functions (pass 'nu ll' if not used) | |
| 375 | try { | |
| 376 | va r scdg_ent ityData = null; | |
| 377 | $. ajax({ | |
| 378 | type: 'G ET', | |
| 379 | contentT ype: 'appl ication/js on; charse t=utf-8', | |
| 380 | datatype : 'json', | |
| 381 | url: scd g_jsonQuer y, | |
| 382 | beforeSe nd: functi on (XMLHtt pRequest) { | |
| 383 | XMLH ttpRequest .setReques tHeader('A ccept', 'a pplication /json'); | |
| 384 | }, | |
| 385 | success: function (data, tex tStatus, X mlHttpRequ est) { | |
| 386 | scdg _entityDat a = data; | |
| 387 | if ( scdg_aSync == true) { | |
| 388 | scdg_aSync Callback(s cdg_entity Data, scdg _skipCount , scdg_opt ionArray); | |
| 389 | } | |
| 390 | }, | |
| 391 | error: f unction (X MLHttpRequ est, textS tatus, err orThrown) { | |
| 392 | aler t('Fail: A jax Error in scdg_ex ecuteCrmOd ataGetRequ est: ' + e rrorThrown + " Reque st: " + sc dg_jsonQue ry); | |
| 393 | }, | |
| 394 | async: s cdg_aSync, | |
| 395 | cache: f alse | |
| 396 | }) ; | |
| 397 | re turn scdg_ entityData ; | |
| 398 | } | |
| 399 | catch (err) { | |
| 400 | al ert('An er ror occure d in the s cdg_execut eCrmOdataG etRequest function. Error Det ail Messag e: ' + err ); | |
| 401 | } | |
| 402 | } | |
| 403 | ||
| 404 | function s cdg_getMul tipleEntit yDataAsync (scdg_enti tySetName, scdg_attr ibuteSet, scdg_condi tionalFilt er, scdg_s ortAttribu te, scdg_s ortDirecti on, scdg_s kipCount, scdg_aSync Callback, scdg_optio nArray) { | |
| 405 | //This function returns a CRM JSON d ataset for all entit y records matching c riteria pr ovided Asy ncronously | |
| 406 | //*scd g_entitySe tName* - i s the name of the en tity set e .g 'Contac tSet' | |
| 407 | //*scd g_attribut eSet* - i s a string containin g the Crm Attributes to retrie ve e.g. 'F irstName, LastName, Telephone1 , EMailAdd ress1' | |
| 408 | //*scd g_conditio nalFilter* - is the conditiona l filter v alue place d on the d ata values retrived e.g. 'Stat eCode/Valu e eq 0' t o retrieve active co ntact reco rds only | |
| 409 | //*scd g_sortAttr ibute* - i s a string containin g the name of the at tribute to sort the result set by e.g. ' LastName' | |
| 410 | //*scd g_sortDire ction* - i s a string specifyin g the sort as Ascend ing or Des cending e. g. 'asc' o r 'desc' | |
| 411 | //*scd g_skipCoun t* - is th e starting point in the result (use if m ore than 5 0), (Put 0 if not us ed) | |
| 412 | //*scd g_aSyncCal lback* - i s the name of the fu nction to call when returning the result | |
| 413 | //*scd g_optionAr ray* - is an optiona l array, t hat contai ns additio nal task s pecific va riables th at can be passed bet ween funct ions | |
| 414 | ||
| 415 | try { | |
| 416 | va r scdg_jso nQuery = s cdg_server Url + scdg _crmOdataE ndPoint + '/' + scdg _entitySet Name + '?$ select=' + scdg_attr ibuteSet + '&$filter =' + scdg_ conditiona lFilter + '&$orderby =' + scdg_ sortAttrib ute + ' ' + scdg_sor tDirection + '&$skip =' + scdg_ skipCount; | |
| 417 | sc dg_execute CrmOdataGe tRequest(s cdg_jsonQu ery, true, scdg_aSyn cCallback, scdg_skip Count, scd g_optionAr ray); | |
| 418 | } | |
| 419 | catch (err) { | |
| 420 | al ert('An er ror occure d in the s cdg_getMul tipleEntit yDataAsync function. Error De tail Messa ge: ' + er r); | |
| 421 | } | |
| 422 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.