49. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/4/2017 8:32:33 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.

49.1 Files compared

# Location File Last Modified
1 VCCM.zip\VCCM\CRM_solutions\VCCMResources\VCCMResources_1_0_0_15.zip\WebResources ftp_VeteranJScriptviersjsEE26FE5A-A735-E711-944E-0050568D743D Fri May 19 20:29:42 2017 UTC
2 VCCM.zip\VCCM\CRM_solutions\VCCMResources\VCCMResources_1_0_0_15.zip\WebResources ftp_VeteranJScriptviersjsEE26FE5A-A735-E711-944E-0050568D743D Thu Nov 30 17:19:01 2017 UTC

49.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 688
Changed 1 2
Inserted 0 0
Removed 0 0

49.3 Comparison options

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

49.4 Active regular expressions

No regular expressions were active.

49.5 Comparison detail

  1   function c heckVIERSU pdatedFiel ds(){
  2           //  Get the c hange flag s from the  form
  3           va r ChangeMo bile = Xrm .Page.getA ttribute(" ftp_ischan gemobile") .getValue( );
  4       var Ch angeHome =  Xrm.Page. getAttribu te("ftp_is changehome ").getValu e();
  5       var Ch angeWork =  Xrm.Page. getAttribu te("ftp_is changework ").getValu e();
  6       var Ch angePermAd dress = Xr m.Page.get Attribute( "ftp_ischa ngepermane ntaddress" ).getValue ();
  7       var Ch angeTempAd dress = Xr m.Page.get Attribute( "ftp_ischa ngetempora ryaddress" ).getValue ();   
  8  
  9           //  If any of  the field s are flag ged, run t he update
  10           if  (ChangeMo bile || Ch angeHome | | ChangeWo rk || Chan gePermAddr ess || Cha ngeTempAdd ress){
  11                    //_I CN = "2016 01102";
  12                    if ( !!_ICN &&  _ICN != "M ISSING") {
  13                             //retr ieve Activ e Settings  record to  get URLs,  THEN quer y VIERS
  14                             var qu eryString  = "$select =*&$filter =mcs_name  eq 'Active  Settings' ";
  15                             SDK.RE ST.retriev eMultipleR ecords(
  16                                      "mcs_set ting",
  17                                      queryStr ing,
  18                                      function  (retrieve dRecords)  {
  19                                               if (typeof  retrieved Records !=  "undefine d" && !!re trievedRec ords && re trievedRec ords.lengt h == 1) re trievedSet tings = re trievedRec ords[0];
  20                                      },
  21                                      errorHan dler,
  22                                      function  () {
  23                                               if (!!retr ievedSetti ngs) {
  24                                                       if  (!(retrie vedSetting s.hasOwnPr operty("ft p_DACURL") ) || !retr ievedSetti ngs.ftp_DA CURL) {
  25                                                                aler t("Could n ot find DA C URL. Set tings retr ieval erro r");
  26                                                                retu rn;
  27                                                       }
  28                                                       
  29                                                       wr iteToConso le("got Ac tive Setti ngs record .");
  30                                                       //  Get the d ate
  31                                                       va r Today =  new Date() ;
  32                                                       va r CurrentD ate = Toda y.getFullY ear() + "- " + (Today .getMonth+ 1) + "-" +  Today.get Date();
  33                                                       
  34                                                       da cURL = ret rievedSett ings.ftp_D ACURL;
  35                                                       VI ERSAddress UpdateURL  = (retriev edSettings .hasOwnPro perty("ftp _VIERSVete ranAddress UpdateURL" )) ? retri evedSettin gs.ftp_VIE RSVeteranA ddressUpda teURL : nu ll;
  36                                                       VI ERSPhoneUp dateURL =  (retrieved Settings.h asOwnPrope rty("ftp_V IERSVetera nPhoneUpda teURL")) ?  retrieved Settings.f tp_VIERSVe teranPhone UpdateURL  : null;
  37                                                        //URL: htt ps://qacrm dac.np.crm .vrm.vba. DNS     /WebParts/ DEV/api/Co ntactInfoS ervice/Upd ateContact Info/Addre ss/{format }/{clientN ame}/{nati onalId}
  38                                                       // VIERS Addr ess Update
  39                                                       if  (ChangePe rmAddress  || ChangeT empAddress ){
  40                                                                if ( VIERSAddre ssUpdateUR L != null)  {
  41                                                                         var ba seESRUrl =  dacURL +  VIERSAddre ssUpdateUR L;        
  42                                                                         var fu llURL = ba seESRUrl +  "/json/ft pcrm/00000 0" + _ICN  + "000000" ;
  43                                                                         
  44                                                                         // Upd ate Permen ant Addres s (One cal l per addr ess)                                                                    
  45                                                                         if (Ch angePermAd dress){
  46                                                                                  // Get t he fields  to send
  47                                                                                  var Addr ess1Line1  = Xrm.Page .getAttrib ute("addre ss1_line1" ).getValue ();
  48                                                                                  var Addr ess1Line2  = Xrm.Page .getAttrib ute("addre ss1_line2" ).getValue ();
  49                                                                                  var Addr ess1City =  Xrm.Page. getAttribu te("addres s1_city"). getValue() ;
  50                                                                                  var Addr ess1State  = Xrm.Page .getAttrib ute("addre ss1_stateo rprovince" ).getValue ();
  51                                                                                  var Addr ess1Postal  = Xrm.Pag e.getAttri bute("addr ess1_posta lcode").ge tValue();
  52                                                                                  var Addr ess1Countr y = Xrm.Pa ge.getAttr ibute("add ress1_coun try").getV alue();
  53                                                                                  
  54                                                                                  //query  ESR using  jquery
  55                                                                                  jQuery.s upport.cor s = true;
  56                                                                                  $.ajax({
  57                                                                                           type: "POS T",
  58                                                                                           ontentType : "applica tion/json;  charset=u tf-8",
  59                                                                                           datatype:  "json",
  60                                                                                           url: fullU RL,
  61                                                                                           data: JSON .stringify ([
  62                                                                                                   {        "icn ":_ICN,
  63                                                                                                            "ove rrideValid ation":fal se,
  64                                                                                                            "sou rceFormNam e":"testFo rmNameValu e1",
  65                                                                                                            "sou rceOfChang eStationId ":"testSrc OfChngStnI d",
  66                                                                                                            "con tactInfo": {"recordLi feSpan":{" start":Cur rentDate," end":""},
  67                                                                                                            "pos talAddress ":{"typeAd dress":{"v alue":"Res idence"},
  68                                                                                                            "add ress":{"ad dressLine1 ":Address1 Line1,"add ressLine2" :Address1L ine2,
  69                                                                                                            "inC areOf":"",
  70                                                                                                            "att ention":"" ,
  71                                                                                                            "cit y":Address 1City,
  72                                                                                                            "sta te":Addres s1State,
  73                                                                                                            "pos talCode":A ddress1Pos tal,
  74                                                                                                            "cou ntry":Addr ess1Countr y,
  75                                                                                                            "tex t":""}},
  76                                                                                                            "pur posePostal Address":{ "recordLif eSpan":{"s tart":Curr entDate},
  77                                                                                                            "typ e":{"codin g":{"code" :{"value": "Correspon dence"}}}} ,
  78                                                                                                            "pre ference":{ "recordLif eSpan":{"s tart":Curr entDate},
  79                                                                                                            "typ e":"Primar y Residenc e"},
  80                                                                                                            "isH omeless":f alse}                                                                                             
  81                                                                                                   }
  82                                                                                           ]),
  83                                                                                           beforeSend : function  (XMLHttpR equest) {
  84                                                                                                   // Specifying  this head er ensures  that the  results wi ll be retu rned as JS ON.
  85                                                                                                   // XMLHttpReq uest.setRe questHeade r("Accept" , "applica tion/json" );
  86                                                                                           },
  87                                                                                           success: f unction (r esponse, t extStatus,  XmlHttpRe quest) {
  88                                                                                                   wr iteToConso le("inside  ajax succ ess");
  89                                                                                                   es rResponseX ML = respo nse.xml;
  90                                                                                                   
  91                                                                                           },
  92                                                                                           error: fun ction (XML HttpReques t, textSta tus, error Thrown) {
  93                                                                                                   al ert("Error  querying  VIERS: " +  errorThro wn + "." +  XMLHttpRe quest.resp onseText +  " Error q uerying VI ERS for ve teran data ");
  94                                                                                                   // setTimeout (queryVIER S, 2000);
  95                                                                                           },
  96                                                                                           async: fal se,
  97                                                                                           cache: fal se
  98                                                                                  });     
  99                                                                         }
  100                                                                         
  101                                                                         // Upd ate Tempor ary Addres s (One cal l per addr ess)                                                                    
  102                                                                         if (Ch angeTempAd dress){
  103                                                                                  // Get t he fields  to send
  104                                                                                  var Addr ess2Line1  = Xrm.Page .getAttrib ute("addre ss2_line1" ).getValue ();
  105                                                                                  var Addr ess2Line2  = Xrm.Page .getAttrib ute("addre ss2_line2" ).getValue ();
  106                                                                                  var Addr ess2City =  Xrm.Page. getAttribu te("addres s2_city"). getValue() ;
  107                                                                                  var Addr ess2State  = Xrm.Page .getAttrib ute("addre ss2_stateo rprovince" ).getValue ();
  108                                                                                  var Addr ess2Postal  = Xrm.Pag e.getAttri bute("addr ess2_posta lcode").ge tValue();
  109                                                                                  var Addr ess2Countr y = Xrm.Pa ge.getAttr ibute("add ress2_coun try").getV alue();
  110                                                                                  var Star tDate = Xr m.Page.get Attribute( "tri_temps tartdate") .getValue( );
  111                                                                                  var EndD ate = Xrm. Page.getAt tribute("t ri_tempend date").get Value();
  112                                                                                  
  113                                                                                  //query  ESR using  jquery
  114                                                                                  jQuery.s upport.cor s = true;
  115                                                                                  $.ajax({
  116                                                                                           type: "POS T",
  117                                                                                           ontentType : "applica tion/json;  charset=u tf-8",
  118                                                                                           datatype:  "json",
  119                                                                                           url: fullU RL,
  120                                                                                           data: JSON .stringify ([
  121                                                                                                   {        "icn ":_ICN,
  122                                                                                                            "ove rrideValid ation":fal se,
  123                                                                                                            "sou rceFormNam e":"testFo rmNameValu e1",
  124                                                                                                            "sou rceOfChang eStationId ":"testSrc OfChngStnI d",
  125                                                                                                            "con tactInfo": {"recordLi feSpan":{" start":Sta rtDate,"en d":EndDate },
  126                                                                                                            "pos talAddress ":{"typeAd dress":{"v alue":"Res idence"},
  127                                                                                                            "add ress":{"ad dressLine1 ":Address2 Line1,"add ressLine2" :Address2L ine2,
  128                                                                                                            "inC areOf":"",
  129                                                                                                            "att ention":"" ,
  130                                                                                                            "cit y":Address 2City,
  131                                                                                                            "sta te":Addres s2State,
  132                                                                                                            "pos talCode":A ddress2Pos tal,
  133                                                                                                            "cou ntry":Addr ess2Countr y,
  134                                                                                                            "tex t":""}},
  135                                                                                                            "pur posePostal Address":{ "recordLif eSpan":{"s tart":Star tDate},
  136                                                                                                            "typ e":{"codin g":{"code" :{"value": "Correspon dence"}}}} ,
  137                                                                                                            "pre ference":{ "recordLif eSpan":{"s tart":Star tDate},
  138                                                                                                            "typ e":"Primar y Residenc e"},
  139                                                                                                            "isH omeless":f alse}                                                                                             
  140                                                                                                   }
  141                                                                                           ]),
  142                                                                                           beforeSend : function  (XMLHttpR equest) {
  143                                                                                                   // Specifying  this head er ensures  that the  results wi ll be retu rned as JS ON.
  144                                                                                                   // XMLHttpReq uest.setRe questHeade r("Accept" , "applica tion/json" );
  145                                                                                           },
  146                                                                                           success: f unction (r esponse, t extStatus,  XmlHttpRe quest) {
  147                                                                                                   wr iteToConso le("inside  ajax succ ess");
  148                                                                                                   es rResponseX ML = respo nse.xml;
  149                                                                                                   
  150                                                                                           },
  151                                                                                           error: fun ction (XML HttpReques t, textSta tus, error Thrown) {
  152                                                                                                   al ert("Error  querying  VIERS: " +  errorThro wn + "." +  XMLHttpRe quest.resp onseText +  " Error q uerying VI ERS for ve teran data ");
  153                                                                                                   // setTimeout (queryVIER S, 2000);
  154                                                                                           },
  155                                                                                           async: fal se,
  156                                                                                           cache: fal se
  157                                                                                  });     
  158                                                                         }                                                            
  159                                                                }
  160                                                                else  {
  161                                                                         alert( "Could not  find VIER S Address  API URL.",  "", "Conf iguration  Error");
  162                                                                         return ;
  163                                                                }
  164                                                       }
  165                                                       // VIERS Phon e Update
  166                                                       if  (ChangeMo bile || Ch angeHome | | ChangeWo rk){
  167                                                                if ( VIERSPhone UpdateURL  != null) {
  168                                                                         var ba seESRUrl =  dacURL +  VIERSPhone UpdateURL;           
  169                                                                         var fu llURL = ba seESRUrl +  "/json/ft pcrm/00000 0" + _ICN  + "000000" ;
  170                                                                         
  171                                                                         // Upd ate Mobile  (One call  per numbe r)
  172                                                                         if (Ch angeMobile ){      
  173                                                                                  //Get th e number
  174                                                                                  var Mobi le = Xrm.P age.getAtt ribute("ft p_mobileph one").getV alue();
  175                                                                                  Mobile =  Mobile.re place(" ", "").replac e("-",""). replace("( ","").repl ace(")","" );
  176                                                                                  //query  ESR using  jquery
  177                                                                                  jQuery.s upport.cor s = true;
  178                                                                                  $.ajax({
  179                                                                                           type: "POS T",
  180                                                                                           contentTyp e: "applic ation/json ; charset= utf-8",
  181                                                                                           datatype:  "json",
  182                                                                                           url: fullU RL,
  183                                                                                           data: JSON .stringify ([
  184                                                                                           {       "i cn":_ICN,
  185                                                                                                   "c ontactInfo ":
  186                                                                                                            {"re cordLifeSp an":
  187                                                                                                                     {"star t":Current Date},
  188                                                                                                                     "phone Number":{" typePhone" :{"value": "Cell / Mo bile"},
  189                                                                                                                              "isDomes tic":true,
  190                                                                                                                              "domesti cAreaCode" :Mobile.su bstring(0, 3),
  191                                                                                                                              "domesti cSubscribe rNumber":M obile.subs tring(3,7) ,
  192                                                                                                                              "extensi on":"",
  193                                                                                                                              "ordinal ity":{"val ue":"Prima ry"}
  194                                                                                                                              },
  195                                                                                                                     "purpo sePhoneNum ber":{"rec ordLifeSpa n":{"start ":CurrentD ate},
  196                                                                                                                     "type" :{"coding" :{"code":{ "value":"T ext Messag e Capable" }}}},
  197                                                                                                                     "prefe rence":{"r ecordLifeS pan":{"sta rt":Curren tDate},
  198                                                                                                                     "type" :{"value": "Work"}},
  199                                                                                                                     "isHom eless":fal se
  200                                                                                                                     }
  201                                                                                                            }
  202                                                                                           ]),
  203                                                                                           beforeSend : function  (XMLHttpR equest) {
  204                                                                                                   // Specifying  this head er ensures  that the  results wi ll be retu rned as JS ON.
  205                                                                                                   // XMLHttpReq uest.setRe questHeade r("Accept" , "applica tion/json" );
  206                                                                                           },
  207                                                                                           success: f unction (r esponse, t extStatus,  XmlHttpRe quest) {
  208                                                                                                   wr iteToConso le("inside  ajax succ ess");
  209                                                                                                   es rResponseX ML = respo nse.xml;
  210                                                                                                                                                                                                                                                                                                                      
  211                                                                                           },
  212                                                                                           error: fun ction (XML HttpReques t, textSta tus, error Thrown) {
  213                                                                                                   al ert("Error  querying  VIERS: " +  errorThro wn + "." +  XMLHttpRe quest.resp onseText +  " Error q uerying VI ERS for ve teran data ");
  214                                                                                                   // setTimeout (queryVIER S, 2000);
  215                                                                                           },
  216                                                                                           async: fal se,
  217                                                                                           cache: fal se
  218                                                                                  });     
  219                                                                         }
  220                                                                         
  221                                                                         // Upd ate Home ( One call p er number)
  222                                                                         if (Ch angeHome){         
  223                                                                                  //Get th e number
  224                                                                                  var Home  = Xrm.Pag e.getAttri bute("ftp_ homephone" ).getValue ();
  225                                                                                  Home = M obile.repl ace(" ","" ).replace( "-","").re place("(", "").replac e(")","");
  226                                                                                  //query  ESR using  jquery
  227                                                                                  jQuery.s upport.cor s = true;
  228                                                                                  $.ajax({
  229                                                                                           type: "POS T",
  230                                                                                           contentTyp e: "applic ation/json ; charset= utf-8",
  231                                                                                           datatype:  "json",
  232                                                                                           url: fullU RL,
  233                                                                                           data: JSON .stringify ([
  234                                                                                           {       "i cn":_ICN,
  235                                                                                                   "c ontactInfo ":
  236                                                                                                            {"re cordLifeSp an":
  237                                                                                                                     {"star t":Current Date},
  238                                                                                                                     "phone Number":{" typePhone" :{"value": "Home"},
  239                                                                                                                              "isDomes tic":true,
  240                                                                                                                              "domesti cAreaCode" :Home.subs tring(0,3) ,
  241                                                                                                                              "domesti cSubscribe rNumber":H ome.substr ing(3,7),
  242                                                                                                                              "extensi on":"",
  243                                                                                                                              "ordinal ity":{"val ue":"Prima ry"}
  244                                                                                                                              },
  245                                                                                                                     "purpo sePhoneNum ber":{"rec ordLifeSpa n":{"start ":CurrentD ate},
  246                                                                                                                     "type" :{"coding" :{"code":{ "value":"" }}}},
  247                                                                                                                     "prefe rence":{"r ecordLifeS pan":{"sta rt":Curren tDate},
  248                                                                                                                     "type" :{"value": "Home"}},
  249                                                                                                                     "isHom eless":fal se
  250                                                                                                                     }
  251                                                                                                            }
  252                                                                                           ]),
  253                                                                                           beforeSend : function  (XMLHttpR equest) {
  254                                                                                                   // Specifying  this head er ensures  that the  results wi ll be retu rned as JS ON.
  255                                                                                                   // XMLHttpReq uest.setRe questHeade r("Accept" , "applica tion/json" );
  256                                                                                           },
  257                                                                                           success: f unction (r esponse, t extStatus,  XmlHttpRe quest) {
  258                                                                                                   wr iteToConso le("inside  ajax succ ess");
  259                                                                                                   es rResponseX ML = respo nse.xml;
  260                                                                                                                                                                                                                                                                                                                      
  261                                                                                           },
  262                                                                                           error: fun ction (XML HttpReques t, textSta tus, error Thrown) {
  263                                                                                                   al ert("Error  querying  VIERS: " +  errorThro wn + "." +  XMLHttpRe quest.resp onseText +  " Error q uerying VI ERS for ve teran data ");
  264                                                                                                   // setTimeout (queryVIER S, 2000);
  265                                                                                           },
  266                                                                                           async: fal se,
  267                                                                                           cache: fal se
  268                                                                                  });     
  269                                                                         }
  270  
  271                                                                         // Upd ate Work ( One call p er number)
  272                                                                         if (Ch angeWork){         
  273                                                                                  //Get th e number
  274                                                                                  var Work  = Xrm.Pag e.getAttri bute("ftp_ workphone" ).getValue ();
  275                                                                                  Work = M obile.repl ace(" ","" ).replace( "-","").re place("(", "").replac e(")","");
  276                                                                                  //query  ESR using  jquery
  277                                                                                  jQuery.s upport.cor s = true;
  278                                                                                  $.ajax({
  279                                                                                           type: "POS T",
  280                                                                                           contentTyp e: "applic ation/json ; charset= utf-8",
  281                                                                                           datatype:  "json",
  282                                                                                           url: fullU RL,
  283                                                                                           data: JSON .stringify ([
  284                                                                                           {       "i cn":_ICN,
  285                                                                                                   "c ontactInfo ":
  286                                                                                                            {"re cordLifeSp an":
  287                                                                                                                     {"star t":Current Date},
  288                                                                                                                     "phone Number":{" typePhone" :{"value": "Work"},
  289                                                                                                                              "isDomes tic":true,
  290                                                                                                                              "domesti cAreaCode" :Work.subs tring(0,3) ,
  291                                                                                                                              "domesti cSubscribe rNumber":W ork.substr ing(3,7),
  292                                                                                                                              "extensi on":"",
  293                                                                                                                              "ordinal ity":{"val ue":"Prima ry"}
  294                                                                                                                              },
  295                                                                                                                     "purpo sePhoneNum ber":{"rec ordLifeSpa n":{"start ":CurrentD ate},
  296                                                                                                                     "type" :{"coding" :{"code":{ "value":"" }}}},
  297                                                                                                                     "prefe rence":{"r ecordLifeS pan":{"sta rt":Curren tDate},
  298                                                                                                                     "type" :{"value": "Home"}},
  299                                                                                                                     "isHom eless":fal se
  300                                                                                                                     }
  301                                                                                                            }
  302                                                                                           ]),
  303                                                                                           beforeSend : function  (XMLHttpR equest) {
  304                                                                                                   // Specifying  this head er ensures  that the  results wi ll be retu rned as JS ON.
  305                                                                                                   // XMLHttpReq uest.setRe questHeade r("Accept" , "applica tion/json" );
  306                                                                                           },
  307                                                                                           success: f unction (r esponse, t extStatus,  XmlHttpRe quest) {
  308                                                                                                   wr iteToConso le("inside  ajax succ ess");
  309                                                                                                   es rResponseX ML = respo nse.xml;
  310                                                                                                                                                                                                                                                                                                                      
  311                                                                                           },
  312                                                                                           error: fun ction (XML HttpReques t, textSta tus, error Thrown) {
  313                                                                                                   al ert("Error  querying  VIERS: " +  errorThro wn + "." +  XMLHttpRe quest.resp onseText +  " Error q uerying VI ERS for ve teran data ");
  314                                                                                                   // setTimeout (queryVIER S, 2000);
  315                                                                                           },
  316                                                                                           async: fal se,
  317                                                                                           cache: fal se
  318                                                                                  });     
  319                                                                         }                                                                     
  320                                                                }
  321                                                                else  {
  322                                                                         alert( "Could not  find VIER S Phone Nu mber API U RL. Config uration Er ror");
  323                                                                         return ;
  324                                                                }
  325                                                       }
  326                                               } //end if  !!retriev edSettings
  327                                               else {
  328                                                       al ert("Could  not find  Active Set tings for  this org;  contact yo ur system  administra tor. Setti ngs retrie val error" );
  329                                                       re turn;
  330                                               }                                  
  331                                      } //end  active set tings retr ieval comp lete callb ack
  332                             );//en d active s ettings qu ery
  333                    }
  334                    else {
  335                             alert( "Could not  query VIE RS. No ICN  provided.  Configura tion error ");
  336                             return ;
  337                    }
  338                    // C lear the c heckboxes
  339                    Xrm. Page.getAt tribute("f tp_ischang emobile"). setValue(0 );                 
  340                    Xrm. Page.getAt tribute("f tp_ischang ehome").se tValue(0);
  341                    Xrm. Page.getAt tribute("f tp_ischang ework").se tValue(0);
  342                    Xrm. Page.getAt tribute("f tp_ischang epermanent address"). setValue(0 );
  343                    Xrm. Page.getAt tribute("f tp_ischang etemporary address"). setValue(0 ); 
  344           }
  345   }