Produced by Araxis Merge on 12/4/2017 8:32:41 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\VCCMResources\WebResources | ftp_ServConnDisabilitiesGridjsServConnDisabilities85656E49-0BE6-E511-9430-0050568D743D | Tue Nov 7 11:34:40 2017 UTC |
| 2 | VCCM.zip\VCCM\CRM_solutions\VCCMResources\WebResources | ftp_ServConnDisabilitiesGridjsServConnDisabilities85656E49-0BE6-E511-9430-0050568D743D | Mon Dec 4 13:05:36 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 870 |
| 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= "SampleJso nData.js" /> | |
| 4 | /// <refer ence path= "../../ftp _/WebServi ceSecurity Lib/js/Web ServiceSec urityLibra ry.js" /> | |
| 5 | ||
| 6 | //ServConn Disabiliti esGridScri ptLib.js | |
| 7 | //Contains variables and funct ions used by the Ser vConnDisab ilitiesGri d.html pag e | |
| 8 | ||
| 9 | //Static V ariables | |
| 10 | var scdg_c rmOdataEnd Point = '/ XRMService s/2011/Org anizationD ata.svc'; | |
| 11 | var scdg_c ontext = G etGlobalCo ntext(); | |
| 12 | var scdg_s erverUrl = scdg_cont ext.getCli entUrl(); | |
| 13 | ||
| 14 | //var scdg _Enrollmen tEligibili tySummaryU RLbase = ' https:// se r
|
|
| 15 | var scdg_e esummaryUR Lbase = '' ; | |
| 16 | var scdg_E nrollmentE ligibility SummaryURL base = ''; | |
| 17 | //Set Defa ult Servic e Return v alue = nul l | |
| 18 | var scdg_E nrollmentE ligibility SummaryDat a = null; | |
| 19 | ||
| 20 | function s cdg_getQue ryVariable (scdg_vari able) { | |
| 21 | try { | |
| 22 | // Get a Quer y Variable | |
| 23 | va r scdg_que ry = windo w.location .search.su bstring(1) ; | |
| 24 | va r scdg_var s = scdg_q uery.split ('&'); | |
| 25 | fo r (var i = 0; i < sc dg_vars.le ngth; i++) { | |
| 26 | var scdg _pair = sc dg_vars[i] .split('=' ); | |
| 27 | if (scdg _pair[0] = = scdg_var iable) { | |
| 28 | retu rn scdg_pa ir[1]; | |
| 29 | } | |
| 30 | } | |
| 31 | // alert('A r equired Qu ery Variab le: ' + sc dg_variabl e + ' is m issing!'); | |
| 32 | re turn ''; | |
| 33 | } | |
| 34 | catch (err) { | |
| 35 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_getQue ryVariable ): " + err .message); | |
| 36 | } | |
| 37 | } | |
| 38 | ||
| 39 | function s cdg_Settin gsWebServi ceURL_resp onse(scdg_ settingDat a, scdg_la stSkip, sc dg_eesumma ryURLbase_ NA) { | |
| 40 | try { | |
| 41 | // scdg_lastS kip is the starting point in t he result (use if mo re than 50 records) //Not used in this s cenario | |
| 42 | va r scdg_Dac Url = null ; | |
| 43 | va r scdg_Enr ollmentEli gibilitySu mmaryApiUr l = null; | |
| 44 | fo r (var i = 0; i <= s cdg_settin gData.d.re sults.leng th - 1; i+ +) { | |
| 45 | //Get in fo | |
| 46 | if (scdg _settingDa ta.d.resul ts[i].ftp_ DACURL != null) { sc dg_DacUrl = scdg_set tingData.d .results[i ].ftp_DACU RL; } | |
| 47 | if (scdg _settingDa ta.d.resul ts[i].ftp_ ESREnrollm entEligibi litySummar yAPIURL != null) { s cdg_Enroll mentEligib ilitySumma ryApiUrl = scdg_sett ingData.d. results[i] .ftp_ESREn rollmentEl igibilityS ummaryAPIU RL; } | |
| 48 | break; | |
| 49 | } | |
| 50 | ||
| 51 | if (scdg_Dac Url != nul l && scdg_ Enrollment Eligibilit ySummaryAp iUrl != nu ll) { | |
| 52 | //Constr uct full w eb service URL | |
| 53 | scdg_Enr ollmentEli gibilitySu mmaryURLba se = scdg_ DacUrl + s cdg_Enroll mentEligib ilitySumma ryApiUrl; | |
| 54 | //Get th e passed n ationalid variable | |
| 55 | var scdg _xrmdata = scdg_getQ ueryVariab le("data") ; | |
| 56 | if (scdg _xrmdata = = null || scdg_xrmda ta == '') { return f alse; } | |
| 57 | //Constr uct Servic e Paramete rs | |
| 58 | var scdg _idobject = {}; | |
| 59 | scdg_ido bject.Nati onalId = ' 000000' + scdg_xrmda ta + '0000 00'; | |
| 60 | var scdg _servicePa rams = [{ | |
| 61 | key: "identifi er", | |
| 62 | type : "c:strin g", | |
| 63 | valu e: JSON.st ringify(sc dg_idobjec t) | |
| 64 | }]; | |
| 65 | //Call t he web ser vice secur ity functi on | |
| 66 | CrmSecur ityTokenEn cryption(s cdg_Enroll mentEligib ilitySumma ryURLbase, scdg_serv iceParams, scdg_serv erUrl, scd g_getEsrEn rollmentJS ON_respons e) | |
| 67 | } | |
| 68 | el se { | |
| 69 | alert("E RROR: THE ENROLLMENT ELIGIBILI TY SUMMARY WEB SERVI CE URL IS MISSING, P LEASE CONT ACT TECHNI CAL SUPPOR T!"); | |
| 70 | } | |
| 71 | ||
| 72 | } | |
| 73 | catch (err) { | |
| 74 | 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); | |
| 75 | } | |
| 76 | } | |
| 77 | ||
| 78 | function s cdg_getEsr Enrollment JSON_respo nse(scdg_e rror, scdg _getesrres ponse) { | |
| 79 | try { | |
| 80 | // NOTE:Expec ting JSON result, if changed t o XML modi fy code ac cordingly. | |
| 81 | ||
| 82 | // Set JSON D ata to Nul l; | |
| 83 | sc dg_Enrollm entEligibi litySummar yData = nu ll; | |
| 84 | ||
| 85 | // Check for non ESR se rvice erro r | |
| 86 | if (scdg_err or != null ) { | |
| 87 | alert("A n ESR Secu re Service error occ ured:\n " + scdg_err or + " \nD ebugInfo: " + scdg_g etesrrespo nse); | |
| 88 | } | |
| 89 | el se { | |
| 90 | //Test f or ESR ser vice error | |
| 91 | if (scdg _getesrres ponse.Erro rOccurred == true) { | |
| 92 | aler t("An ESR Secure Ser vice error occurred: \n " + scd g_getesrre sponse.Err orMessage + " \nDebu gInfo: " + scdg_gete srresponse .DebugInfo ); | |
| 93 | } | |
| 94 | else { | |
| 95 | //Se t Data Ret urned | |
| 96 | scdg _Enrollmen tEligibili tySummaryD ata = scdg _getesrres ponse; | |
| 97 | } | |
| 98 | } | |
| 99 | // Build the Grid | |
| 100 | sc dg_BuildGr id(); | |
| 101 | } | |
| 102 | catch (err) { | |
| 103 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_getEsr Enrollment JSON_respo nse): " + err.messag e); | |
| 104 | } | |
| 105 | } | |
| 106 | ||
| 107 | function s cdg_FormLo ad() { | |
| 108 | try { | |
| 109 | // GET CRM SE TTINGS WEB SERVICE U RLS | |
| 110 | va r scdg_con ditionalFi lter = "(m cs_name eq 'Active S ettings')" ; | |
| 111 | sc dg_getMult ipleEntity DataAsync( 'mcs_setti ngSet', 'f tp_DACURL, ftp_ESREn rollmentEl igibilityS ummaryAPIU RL', scdg_ conditiona lFilter, ' mcs_name', 'asc', 0, scdg_Sett ingsWebSer viceURL_re sponse, sc dg_eesumma ryURLbase) ; | |
| 112 | } | |
| 113 | catch (err) { | |
| 114 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_FormLo ad): " + e rr.message ); | |
| 115 | } | |
| 116 | } | |
| 117 | ||
| 118 | function s cdg_BuildG rid() { | |
| 119 | try { | |
| 120 | // Temporary action: js on result is empty, use sample data | |
| 121 | // ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******** | |
| 122 | // if (scdg_E nrollmentE ligibility SummaryDat a == null || scdg_En rollmentEl igibilityS ummaryData == '') { scdg_Enrol lmentEligi bilitySumm aryData = json_resul t2[0]; } | |
| 123 | // ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******** | |
| 124 | ||
| 125 | // Define Gri ds | |
| 126 | // Define the main grid | |
| 127 | $( '#ku_disab ilitygrid' ).kendoGri d({ | |
| 128 | columns: [ | |
| 129 | { fi eld: 'ID', type: 'st ring', hid den: true }, | |
| 130 | { fi eld: 'type ', title: 'Eligibili ty', type: 'string' }, | |
| 131 | { fi eld: 'enro llmentCate goryName', title: 'S tatus', ty pe: 'strin g' }, | |
| 132 | { fi eld: 'rate dDisabilit yPercentag eTotal', t itle: 'SC% (total)', type: 'st ring' }, | |
| 133 | { fi eld: 'envC ontaminant sInd', tit le: 'Envir onmental C ontaminant ', type: ' string' }, | |
| 134 | { fi eld: 'radi ationExpos ureInd', t itle: 'Rad iation Exp osure', ty pe: 'strin g' }, | |
| 135 | { fi eld: 'agen tOrangeInd ', title: 'Agent Ora nge', type : 'string' }, | |
| 136 | { fi eld: 'camp LejeuneInd ', title: 'Camp Leje une', type : 'string' }, | |
| 137 | { fi eld: 'diag nosedWithC ancer', ti tle: 'Head /Neck Canc er', type: 'string' }, | |
| 138 | { fi eld: 'mili tarySexual Trauma', t itle: 'Mil itary Sexu al Trauma' , type: 's tring' }, | |
| 139 | { fi eld: 'comb atVeteran' , title: ' Combat Vet eran', typ e: 'string ' }, | |
| 140 | { fi eld: 'shad Indicator' , title: ' Shipboard Hazard & D efense', t ype: 'stri ng' } | |
| 141 | ], | |
| 142 | dataSour ce: { | |
| 143 | sche ma: { | |
| 144 | model: { | |
| 145 | id: 'I D' | |
| 146 | } | |
| 147 | } | |
| 148 | }, | |
| 149 | groupabl e: false, | |
| 150 | sortable : false, | |
| 151 | editable : false, | |
| 152 | height: 130, | |
| 153 | resizabl e: true, | |
| 154 | navigata ble: true, | |
| 155 | selectab le: false, | |
| 156 | noRecord s: true | |
| 157 | }) ; | |
| 158 | // Define the detail gr id | |
| 159 | $( '#ku_disab ilitydetai lgrid').ke ndoGrid({ | |
| 160 | columns: [ | |
| 161 | { fi eld: 'ID', type: 'st ring', hid den: true }, | |
| 162 | { fi eld: 'disa bility', t itle: 'Ind ividual Di sability', type: 'st ring' }, | |
| 163 | { fi eld: 'perc entage', t itle: 'SC% ', type: ' string' } | |
| 164 | ], | |
| 165 | dataSour ce: { | |
| 166 | sche ma: { | |
| 167 | model: { | |
| 168 | id: 'I D' | |
| 169 | } | |
| 170 | } | |
| 171 | }, | |
| 172 | groupabl e: false, | |
| 173 | sortable : false, | |
| 174 | editable : false, | |
| 175 | height: 200, | |
| 176 | resizabl e: true, | |
| 177 | navigata ble: true, | |
| 178 | selectab le: false, | |
| 179 | noRecord s: true | |
| 180 | }) ; | |
| 181 | ||
| 182 | // Create dis abilty gri d datasour ce | |
| 183 | va r scdg_dis abilityGri d = $('#ku _disabilit ygrid').da ta('kendoG rid'); | |
| 184 | // Create dis abilty det ail grid d atasource | |
| 185 | va r scdg_dis abilitydet ailGrid = $('#ku_dis abilitydet ailgrid'). data('kend oGrid'); | |
| 186 | ||
| 187 | // Data from parentnode 'enrollme ntDetermin ationInfo' | |
| 188 | va r $scdg_en rollmentDe terminatio nInfo = nu ll; | |
| 189 | va r $scdg_pr imaryEligi bility = n ull; | |
| 190 | va r $scdg_ty pe = null; | |
| 191 | va r scdg_typ eText = nu ll; | |
| 192 | va r $scdg_en rollmentCa tegoryName = null; | |
| 193 | va r scdg_enr ollmentCat egoryNameT ext = null ; | |
| 194 | va r $scdg_sp ecialFacto rs = null; | |
| 195 | va r $scdg_en vContamina ntsInd = n ull; | |
| 196 | va r scdg_env Contaminan tsIndText = null; | |
| 197 | va r $scdg_ra diationExp osureInd = null; | |
| 198 | va r scdg_rad iationExpo sureIndTex t = null; | |
| 199 | va r $scdg_ag entOrangeI nd = null; | |
| 200 | va r scdg_age ntOrangeIn dText = nu ll; | |
| 201 | va r $scdg_ca mpLejeuneI nd = null; | |
| 202 | va r scdg_cam pLejeuneIn dText = nu ll; | |
| 203 | va r $scdg_se rviceConne ctionAward = null; | |
| 204 | va r $scdg_se rviceConne ctedPercen tage = nul l; | |
| 205 | va r scdg_ser viceConnec tedPercent ageText = null; | |
| 206 | va r $scdg_ra tedDisabil ities = nu ll; | |
| 207 | ||
| 208 | va r $scdg_ag entOrangeL ocation = null; | |
| 209 | va r scdg_age ntOrangeLo cationText = null; | |
| 210 | va r $scdg_ra diationExp osureMetho d = null; | |
| 211 | va r scdg_rad iationExpo sureMethod Text = nul l; | |
| 212 | ||
| 213 | va r $scdg_no seThroatRa diumInfo = null; | |
| 214 | va r $scdg_di agnosedWit hCancer = null; | |
| 215 | va r scdg_dia gnosedWith CancerText = null; | |
| 216 | ||
| 217 | va r $scdg_mi litarySexu alTraumaIn fo = null; | |
| 218 | va r $scdg_mi lSexTrauma Status = n ull; | |
| 219 | va r scdg_mil SexTraumaS tatusText = null; | |
| 220 | ||
| 221 | // Data from parentnode 'military ServiceInf o' | |
| 222 | va r $scdg_mi litaryServ iceInfo = null; | |
| 223 | va r $scdg_co mbatVetera nEligibili tyEndDate = null; | |
| 224 | va r scdg_com batVeteran Eligibilit yEndDateTe xt = null; | |
| 225 | va r $scdg_sh adIndicato r = null; | |
| 226 | va r scdg_sha dIndicator Text = nul l; | |
| 227 | ||
| 228 | va r scdg_rat edDisabili tyPercenta geTotal = 0; | |
| 229 | va r scdg_det ailrowcoun t = 0; | |
| 230 | ||
| 231 | if (scdg_Enr ollmentEli gibilitySu mmaryData != null) { | |
| 232 | $scdg_en rollmentDe terminatio nInfo = sc dg_Enrollm entEligibi litySummar yData.Data .Enrollmen tDetermina tionInfo; | |
| 233 | } | |
| 234 | ||
| 235 | if ($scdg_en rollmentDe terminatio nInfo != n ull) { | |
| 236 | $scdg_pr imaryEligi bility = $ scdg_enrol lmentDeter minationIn fo.Primary Eligibilit y; | |
| 237 | if ($scd g_primaryE ligibility != null) { | |
| 238 | $scd g_type = $ scdg_prima ryEligibil ity.Type; | |
| 239 | if ( $scdg_type != null) { scdg_typ eText = $s cdg_type; } | |
| 240 | } | |
| 241 | $scdg_en rollmentCa tegoryName = $scdg_e nrollmentD eterminati onInfo.Enr ollmentCat egoryName; | |
| 242 | if ($scd g_enrollme ntCategory Name != nu ll) { scdg _enrollmen tCategoryN ameText = $scdg_enro llmentCate goryName; } | |
| 243 | ||
| 244 | $scdg_sp ecialFacto rs = $scdg _enrollmen tDetermina tionInfo.S pecialFact ors; | |
| 245 | if ($scd g_specialF actors != null) { | |
| 246 | $scd g_envConta minantsInd = $scdg_s pecialFact ors.EnvCon taminantsI nd; | |
| 247 | if ( $scdg_envC ontaminant sInd != nu ll) { scdg _envContam inantsIndT ext = $scd g_envConta minantsInd ; } | |
| 248 | ||
| 249 | $scd g_radiatio nExposureI nd = $scdg _specialFa ctors.Radi ationExpos ureInd; | |
| 250 | if ( $scdg_radi ationExpos ureInd != null) { sc dg_radiati onExposure IndText = $scdg_radi ationExpos ureInd; } | |
| 251 | ||
| 252 | $scd g_agentOra ngeInd = $ scdg_speci alFactors. AgentOrang eInd; | |
| 253 | if ( $scdg_agen tOrangeInd != null) { scdg_age ntOrangeIn dText = $s cdg_agentO rangeInd; } | |
| 254 | ||
| 255 | $scd g_campLeje uneInd = $ scdg_speci alFactors. CampLejeun eInd; | |
| 256 | if ( $scdg_camp LejeuneInd != null) { scdg_cam pLejeuneIn dText = $s cdg_campLe jeuneInd; } | |
| 257 | ||
| 258 | $scd g_agentOra ngeLocatio n = $scdg_ specialFac tors.Agent OrangeLoca tion; | |
| 259 | if ( $scdg_agen tOrangeLoc ation != n ull) { scd g_agentOra ngeLocatio nText = $s cdg_agentO rangeLocat ion; } | |
| 260 | ||
| 261 | $scd g_radiatio nExposureM ethod = $s cdg_specia lFactors.R adiationEx posureMeth od; | |
| 262 | if ( $scdg_radi ationExpos ureMethod != null) { scdg_radi ationExpos ureMethodT ext = $scd g_radiatio nExposureM ethod; } | |
| 263 | } | |
| 264 | ||
| 265 | $scdg_se rviceConne ctionAward = $scdg_e nrollmentD eterminati onInfo.Ser viceConnec tionAward; | |
| 266 | if ($scd g_serviceC onnectionA ward != nu ll) { | |
| 267 | $scd g_serviceC onnectedPe rcentage = $scdg_ser viceConnec tionAward. ServiceCon nectedPerc entage; | |
| 268 | if ( $scdg_serv iceConnect edPercenta ge != null ) { scdg_s erviceConn ectedPerce ntageText = $scdg_se rviceConne ctedPercen tage; } | |
| 269 | ||
| 270 | $scd g_ratedDis abilities = $scdg_se rviceConne ctionAward .RatedDisa bilities; | |
| 271 | //Ge t each dis ability li sted | |
| 272 | for (var i = 0 ; i <= $sc dg_ratedDi sabilities .RatedDisa bility.len gth - 1; i ++) { | |
| 273 | var scdg_r atedDisabi lityPercen t = 0; | |
| 274 | var scdg_d isability = null; | |
| 275 | if (Number ($scdg_rat edDisabili ties.Rated Disability [i].Percen tage) > 0) { | |
| 276 | scdg_r atedDisabi lityPercen tageTotal = scdg_rat edDisabili tyPercenta geTotal + Number($sc dg_ratedDi sabilities .RatedDisa bility[i]. Percentage ); | |
| 277 | scdg_r atedDisabi lityPercen t = Number ($scdg_rat edDisabili ties.Rated Disability [i].Percen tage); | |
| 278 | } | |
| 279 | ||
| 280 | //Add to d etail grid | |
| 281 | scdg_detai lrowcount = scdg_det ailrowcoun t + 1; | |
| 282 | scdg_disab ilitydetai lGrid.data Source.pus hCreate({ | |
| 283 | ID: sc dg_detailr owcount, | |
| 284 | disabi lity: $scd g_ratedDis abilities. RatedDisab ility[i].D isability, | |
| 285 | percen tage: scdg _ratedDisa bilityPerc ent | |
| 286 | }); | |
| 287 | }; | |
| 288 | } | |
| 289 | ||
| 290 | $scdg_no seThroatRa diumInfo = $scdg_enr ollmentDet ermination Info.NoseT hroatRadiu mInfo; | |
| 291 | if ($scd g_noseThro atRadiumIn fo != null ) { | |
| 292 | $scd g_diagnose dWithCance r = $scdg_ noseThroat RadiumInfo .Diagnosed WithCancer ; | |
| 293 | if ( $scdg_diag nosedWithC ancer != n ull) { scd g_diagnose dWithCance rText = $s cdg_diagno sedWithCan cer; } | |
| 294 | } | |
| 295 | ||
| 296 | $scdg_mi litarySexu alTraumaIn fo = $scdg _enrollmen tDetermina tionInfo.M ilitarySex ualTraumaI nfo; | |
| 297 | if ($scd g_military SexualTrau maInfo != null) { | |
| 298 | $scd g_milSexTr aumaStatus = $scdg_m ilitarySex ualTraumaI nfo.Status ; | |
| 299 | if ( $scdg_milS exTraumaSt atus != nu ll) { scdg _milSexTra umaStatusT ext = $scd g_milSexTr aumaStatus ; } | |
| 300 | } | |
| 301 | } | |
| 302 | ||
| 303 | if (scdg_Enr ollmentEli gibilitySu mmaryData != null) { | |
| 304 | $scdg_mi litaryServ iceInfo = scdg_Enrol lmentEligi bilitySumm aryData.Da ta.Militar yServiceIn fo; | |
| 305 | } | |
| 306 | if ($scdg_mi litaryServ iceInfo != null) { | |
| 307 | $scdg_co mbatVetera nEligibili tyEndDate = $scdg_mi litaryServ iceInfo.Co mbatVetera nEligibili tyEndDate; | |
| 308 | if ($scd g_combatVe teranEligi bilityEndD ate != nul l) { | |
| 309 | scdg _combatVet eranEligib ilityEndDa teText = s cdg_combat VeteranEli gibilityEn dDateText = $scdg_co mbatVetera nEligibili tyEndDate; | |
| 310 | } | |
| 311 | $scdg_sh adIndicato r = $scdg_ militarySe rviceInfo. ShadIndica tor; | |
| 312 | if ($scd g_shadIndi cator != n ull) { scd g_shadIndi catorText = $scdg_sh adIndicato r; } | |
| 313 | } | |
| 314 | ||
| 315 | // If no elig ibility sp ecified, s et to fals e | |
| 316 | if (scdg_typ eText == n ull || scd g_typeText == '') { scdg_typeT ext = fals e; } | |
| 317 | ||
| 318 | // Change boo lean value s to false if not ma rked true | |
| 319 | if (scdg_env Contaminan tsIndText != 'true') { scdg_en vContamina ntsIndText = false; } | |
| 320 | if (scdg_rad iationExpo sureIndTex t != 'true ') { scdg_ radiationE xposureInd Text = fal se; } | |
| 321 | if (scdg_age ntOrangeIn dText != ' true') { s cdg_agentO rangeIndTe xt = false ; } | |
| 322 | if (scdg_cam pLejeuneIn dText != ' true') { s cdg_campLe jeuneIndTe xt = false ; } | |
| 323 | ||
| 324 | if (scdg_dia gnosedWith CancerText != 'true' ) { scdg_d iagnosedWi thCancerTe xt = false ; } | |
| 325 | if (scdg_sha dIndicator Text != 't rue') { sc dg_shadInd icatorText = false; } | |
| 326 | ||
| 327 | // Change all True/Fals e to Yes/N o and Hide No column s | |
| 328 | if (scdg_typ eText == f alse) { sc dg_typeTex t = 'No'; } | |
| 329 | ||
| 330 | 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"); } | |
| 331 | if (scdg_rad iationExpo sureIndTex t == "true ") { | |
| 332 | scdg_rad iationExpo sureIndTex t = "Yes"; | |
| 333 | if (scdg _radiation ExposureMe thodText ! = null) { scdg_radia tionExposu reIndText = scdg_rad iationExpo sureIndTex t + " - " + scdg_rad iationExpo sureMethod Text; } | |
| 334 | } else { | |
| 335 | scdg_rad iationExpo sureIndTex t = "No"; scdg_disab ilityGrid. hideColumn ("radiatio nExposureI nd"); | |
| 336 | } | |
| 337 | if (scdg_age ntOrangeIn dText == " true") { | |
| 338 | scdg_age ntOrangeIn dText = "Y es"; | |
| 339 | if (scdg _agentOran geLocation Text != nu ll) { scdg _agentOran geIndText = scdg_age ntOrangeIn dText + " - " + scdg _agentOran geLocation Text; } | |
| 340 | } | |
| 341 | el se { | |
| 342 | scdg_age ntOrangeIn dText = "N o"; scdg_d isabilityG rid.hideCo lumn("agen tOrangeInd "); | |
| 343 | } | |
| 344 | 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" ); } | |
| 345 | ||
| 346 | 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" ); } | |
| 347 | ||
| 348 | if (scdg_mil SexTraumaS tatusText == null || scdg_milS exTraumaSt atusText = = '') { sc dg_disabil ityGrid.hi deColumn(" militarySe xualTrauma "); } | |
| 349 | ||
| 350 | 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") ; } | |
| 351 | ||
| 352 | 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"); } | |
| 353 | ||
| 354 | // Update dis ability ma in grid da ta | |
| 355 | sc dg_disabil ityGrid.da taSource.p ushCreate( { | |
| 356 | ID: '01' , | |
| 357 | type: sc dg_typeTex t, | |
| 358 | enrollme ntCategory Name: scdg _enrollmen tCategoryN ameText, | |
| 359 | ratedDis abilityPer centageTot al: scdg_s erviceConn ectedPerce ntageText, | |
| 360 | envConta minantsInd : scdg_env Contaminan tsIndText, | |
| 361 | radiatio nExposureI nd: scdg_r adiationEx posureIndT ext, | |
| 362 | agentOra ngeInd: sc dg_agentOr angeIndTex t, | |
| 363 | campLeje uneInd: sc dg_campLej euneIndTex t, | |
| 364 | diagnose dWithCance r: scdg_di agnosedWit hCancerTex t, | |
| 365 | military SexualTrau ma: scdg_m ilSexTraum aStatusTex t, | |
| 366 | combatVe teran: scd g_combatVe teranEligi bilityEndD ateText, | |
| 367 | shadIndi cator: scd g_shadIndi catorText | |
| 368 | }) ; | |
| 369 | ||
| 370 | // Hide the d etails gri d if the S C% total = 0 | |
| 371 | if (scdg_rat edDisabili tyPercenta geTotal == 0 || scdg _ratedDisa bilityPerc entageTota l == null || scdg_ra tedDisabil ityPercent ageTotal = = '') { | |
| 372 | $('#ku_d isabilityd etailgrid' ).hide(); | |
| 373 | } | |
| 374 | ||
| 375 | } | |
| 376 | catch (err) { | |
| 377 | al ert("Servi ce Connect ed Disabil ities Grid Web Resou rce Functi on Error(s cdg_BuildG rid): " + err.messag e); | |
| 378 | } | |
| 379 | } | |
| 380 | ||
| 381 | ||
| 382 | function s cdg_execut eCrmOdataG etRequest( scdg_jsonQ uery, scdg _aSync, sc dg_aSyncCa llback, sc dg_skipCou nt, scdg_o ptionArray ) { | |
| 383 | //This function executes a CRM Odata web servi ce call to retrieve Crm data | |
| 384 | //*scd g_jsonQuer y* - a pro perly form atted CRM Odata Quer y string ( required) | |
| 385 | //*scd g_aSync* - specify ' true' to e xecute asy nchronousl y otherwis e 'false' (required) | |
| 386 | //*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 '') | |
| 387 | //*scd g_skipCoun t* - Initi al setting is always '0', incr ements by 50 per CRM SDK Odata standards (required ) | |
| 388 | //*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) | |
| 389 | try { | |
| 390 | va r scdg_ent ityData = null; | |
| 391 | $. ajax({ | |
| 392 | type: 'G ET', | |
| 393 | contentT ype: 'appl ication/js on; charse t=utf-8', | |
| 394 | datatype : 'json', | |
| 395 | url: scd g_jsonQuer y, | |
| 396 | beforeSe nd: functi on (XMLHtt pRequest) { | |
| 397 | XMLH ttpRequest .setReques tHeader('A ccept', 'a pplication /json'); | |
| 398 | }, | |
| 399 | success: function (data, tex tStatus, X mlHttpRequ est) { | |
| 400 | scdg _entityDat a = data; | |
| 401 | if ( scdg_aSync == true) { | |
| 402 | scdg_aSync Callback(s cdg_entity Data, scdg _skipCount , scdg_opt ionArray); | |
| 403 | } | |
| 404 | }, | |
| 405 | error: f unction (X MLHttpRequ est, textS tatus, err orThrown) { | |
| 406 | aler t('Fail: A jax Error in scdg_ex ecuteCrmOd ataGetRequ est: ' + e rrorThrown + " Reque st: " + sc dg_jsonQue ry); | |
| 407 | }, | |
| 408 | async: s cdg_aSync, | |
| 409 | cache: f alse | |
| 410 | }) ; | |
| 411 | re turn scdg_ entityData ; | |
| 412 | } | |
| 413 | catch (err) { | |
| 414 | al ert('An er ror occure d in the s cdg_execut eCrmOdataG etRequest function. Error Det ail Messag e: ' + err ); | |
| 415 | } | |
| 416 | } | |
| 417 | ||
| 418 | 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) { | |
| 419 | //This function returns a CRM JSON d ataset for all entit y records matching c riteria pr ovided Asy ncronously | |
| 420 | //*scd g_entitySe tName* - i s the name of the en tity set e .g 'Contac tSet' | |
| 421 | //*scd g_attribut eSet* - i s a string containin g the Crm Attributes to retrie ve e.g. 'F irstName, LastName, Telephone1 , EMailAdd ress1' | |
| 422 | //*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 | |
| 423 | //*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' | |
| 424 | //*scd g_sortDire ction* - i s a string specifyin g the sort as Ascend ing or Des cending e. g. 'asc' o r 'desc' | |
| 425 | //*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) | |
| 426 | //*scd g_aSyncCal lback* - i s the name of the fu nction to call when returning the result | |
| 427 | //*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 | |
| 428 | ||
| 429 | try { | |
| 430 | 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; | |
| 431 | sc dg_execute CrmOdataGe tRequest(s cdg_jsonQu ery, true, scdg_aSyn cCallback, scdg_skip Count, scd g_optionAr ray); | |
| 432 | } | |
| 433 | catch (err) { | |
| 434 | al ert('An er ror occure d in the s cdg_getMul tipleEntit yDataAsync function. Error De tail Messa ge: ' + er r); | |
| 435 | } | |
| 436 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.