Produced by Araxis Merge on 5/9/2017 12:03:03 PM Eastern Daylight 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 | Tue May 9 16:03:03 2017 UTC | ||
| 2 | OSCIF_HEC_v1.4_Sprint23_build4_Apr_2017.zip\CRM_solutions\Managed\North52BPA_1_0_0_506_managed_2013_2015_2016..zip\WebResources | north52_javascriptn52clientside0F987E42-6169-E211-BEE9-00155DF5B00D | Mon Sep 19 18:20:18 2016 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 1 |
| 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 | "undefined "==typeof N52&&(N52= {}),N52.Cl ientside={ ExecuteFor mulas:func tion(a,b){ try{var c= "",d=N52.C lientside. BuildFormu laArgs(arg uments);if (window.ar gsFormula= d,"undefin ed"!=typeo f N52.Clie ntside.Xrm Parent().P age.contex t.isOutloo kOnline&&0 ==N52.Clie ntside.Xrm Parent().P age.contex t.isOutloo kOnline()) return;if( "undefined "!=typeof N52.Client side.XrmPa rent().Pag e.context. client&&"O nline"!=N5 2.Clientsi de.XrmPare nt().Page. context.cl ient.getCl ientState( ))return;i f(c="undef ined"!=typ eof N52.Cl ientside.X rmParent() .Page.cont ext.client &&"Mobile" ==N52.Clie ntside.Xrm Parent().P age.contex t.client.g etClient() ||"2178900 01"==N52.C lientside. GetPayLoad Element(5) ?N52.Clien tside.GetD ataXml():N 52.Clients ide.XrmPar ent().Page .data.enti ty.getData Xml(),1!=N 52.Clients ide.XrmPar ent().Page .ui.getFor mType()&&2 !=N52.Clie ntside.Xrm Parent().P age.ui.get FormType() &&3!=N52.C lientside. XrmParent( ).Page.ui. getFormTyp e()&&4!=N5 2.Clientsi de.XrmPare nt().Page. ui.getForm Type()&&5! =N52.Clien tside.XrmP arent().Pa ge.ui.getF ormType()) return;var e=N52.Cli entside.Ge tFormulas( d);if(0==e .length)re turn;if(1= =N52.Clien tside.Exit SaveMode(d ,a))return ;N52.Clien tside.Regi sterEvents (d);var f= N52.Client side.GetFi elds(d);if (c=N52.Cli entside.Re ducePayLoa d(c,f),c=N 52.Clients ide.Optimi zePayLoad( c),"undefi ned"!=type of N52.Cli entside.Xr mParent(). Page.ui.cl earFormNot ification& &N52.Clien tside.XrmP arent().Pa ge.ui.clea rFormNotif ication("V alidation" ),null==wi ndow.allow SaveEvent& &null!=a.g etEventArg s()&&"2178 90000"==N5 2.Clientsi de.GetPayL oadElement (7)&&a.get EventArgs( ).preventD efault(),n ull!=windo w.executio nContext)r eturn void setTimeou t(function (){N52.Cli entside.Ex ecuteFormu las(a,d)}, 3e3);if(wi ndow.execu tionContex t=a,null== window.all owSaveEven t){var g=" $select=no rth52_Resu lt&$filter =north52_n ame eq '"+ e+"' and n orth52_Par ameters eq '"+c+"' a nd north52 _TargetEnt ityID eq ' "+N52.Clie ntside.Xrm Parent().P age.data.e ntity.getI d()+"' and north52_F ormulaType eq '"+N52 .Clientsid e.XrmParen t().Page.u i.getFormT ype()+"'"; if(g.lengt h>2050)ret urn void N 52.Clients ide.Displa yMessage(" North52 BP A: Web bro wser URL l ength exce eded. Plea se see the North52 k nowledge b ase articl e to resol ve this is sue.");"21 7890001"== N52.Client side.GetPa yLoadEleme nt(6)||"21 7890000"== N52.Client side.GetPa yLoadEleme nt(6)&&nul l!=window. executionC ontext.get EventArgs( )?N52.REST .retrieveM ultipleRec ordsSync(" north52_fo rmulacalcu lation",g, N52.Client side.Retri eveFormula CallBack,f unction(a) {a.message .startsWit h("Error : 0")||(par ent.consol e.log(a.me ssage),win dow.execut ionContext =null,N52. Clientside .DisplayMe ssage("Nor th52 BPA: An error h as occurre d please c ontact you r system a dministrat or. Altern atively hi t F12 and review the console l og."))},N5 2.Clientsi de.Formula sRetrieveC omplete):N 52.REST.re trieveMult ipleRecord s("north52 _formulaca lculation" ,g,N52.Cli entside.Re trieveForm ulaCallBac k,function (a){a.mess age.starts With("Erro r : 0")||( parent.con sole.log(a .message), window.exe cutionCont ext=null,N 52.Clients ide.Displa yMessage(" North52 BP A: An erro r has occu rred pleas e contact your syste m administ rator. Alt ernatively hit F12 a nd review the consol e log..!"+ a.message) )},N52.Cli entside.Fo rmulasRetr ieveComple te)}else w indow.allo wSaveEvent =null}catc h(a){paren t.console. log(a.mess age),windo w.executio nContext=n ull;var h= "North52 B PA: An err or has occ urred plea se contact your syst em adminis trator. Al ternativel y hit F12 and review the conso le log..." ;"undefine d"!=typeof N52.Clien tside.XrmP arent().Pa ge.context .client&&" 3"==N52.Cl ientside.X rmParent() .Page.cont ext.client .getFormFa ctor()&&(h =a.message +"<>"+a.st ack),N52.C lientside. DisplayMes sage(h)}}, RetrieveFo rmulaCallB ack:functi on(a){try{ window.Val idationMes sage="";fo r(var b=0; b<a.length ;b++){var c=a[b];if( "NoOp"!=c. north52_Re sult){var d=N52JSON. parse(c.no rth52_Resu lt);if("No Op"!=d.Pro pertyValue Action)if( d instance of Array)f or(j=0;j<d .length;j+ +)"2178900 15"==d[j]. FormulaTyp e||"217890 014"==d[j] .FormulaTy pe?N52.Cli entside.Ca llFormulaA ctionResul t(d[j].Pro pertyName, d[j].Prope rtyValueAc tion):"217 890003"==d [j].Formul aType&&N52 .Clientsid e.CallForm ulaSetValu eResult(d[ j].Propert yName,d[j] .PropertyV alueAction );else"217 890015"==d .FormulaTy pe||"21789 0014"==d.F ormulaType ?N52.Clien tside.Call FormulaAct ionResult( d.Property Name,d.Pro pertyValue Action):"2 17890003"= =d.Formula Type?N52.C lientside. CallFormul aSetValueR esult(d.Pr opertyName ,d.Propert yValueActi on):"21789 0004"==d.F ormulaType &&N52.Clie ntside.Cal lFormulaVa lidation(d .PropertyV alueAction )}}if(wind ow.Validat ionMessage .length>0) "undefined "!=typeof N52.Client side.XrmPa rent().Pag e.ui.clear FormNotifi cation?N52 .Clientsid e.XrmParen t().Page.u i.setFormN otificatio n(window.V alidationM essage,"ER ROR","Vali dation"):N 52.Clients ide.Alert( window.Val idationMes sage),null !=window.e xecutionCo ntext.getE ventSource ()&&null!= window.exe cutionCont ext.getEve ntSource() .controls& &window.ex ecutionCon text.getEv entSource( ).controls .get(0).se tFocus();e lse if(nul l!=window. executionC ontext&&nu ll!=window .execution Context.ge tEventArgs ()&&"21789 0000"==N52 .Clientsid e.GetPayLo adElement( 7)){var e= null;2==wi ndow.execu tionContex t.getEvent Args().get SaveMode() ?e="savean dclose":59 ==window.e xecutionCo ntext.getE ventArgs() .getSaveMo de()&&(e=" saveandnew "),window. allowSaveE vent=!0,wi ndow.execu tionContex t=null,N52 .Clientsid e.XrmParen t().Page.d ata.entity .save(e)}} catch(a){p arent.cons ole.log(a. message),N 52.Clients ide.Displa yMessage(" North52 BP A: An erro r has occu rred pleas e contact your syste m administ rator. Alt ernatively hit F12 a nd review the consol e log...." )}finally{ window.exe cutionCont ext=null}} ,FormulasR etrieveCom plete:func tion(){},C allFormula Validation :function( a){try{win dow.Valida tionMessag e+=a[0]+"\ r\n"}catch (a){if(a.m essage.ind exOf("get_ initial")> -1||a.mess age.indexO f("add_aft erSelect") >-1||a.mes sage.index Of("Object expected" )>-1||a.me ssage.inde xOf("null is not an object")>- 1)return;p arent.cons ole.log(a. message),N 52.Clients ide.Displa yMessage(" North52 BP A: Failure to comple te formula execution : "+a.mes sage)}},Ca llFormulaS etValueRes ult:functi on(a,b){tr y{if(null= =N52.Clien tside.XrmP arent().Pa ge.data.en tity.attri butes.get( a))return; "lookup"== N52.Client side.XrmPa rent().Pag e.data.ent ity.attrib utes.get(a ).getAttri buteType() ?N52.Clien tside.SetL ookupValue (a,b):"dat etime"==N5 2.Clientsi de.XrmPare nt().Page. data.entit y.attribut es.get(a). getAttribu teType()?N 52.Clients ide.SetDat eTimeValue (a,b):"int eger"==N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).g etAttribut eType()?N5 2.Clientsi de.SetInte gerValue(a ,b):"decim al"==N52.C lientside. XrmParent( ).Page.dat a.entity.a ttributes. get(a).get AttributeT ype()?N52. Clientside .SetDecima lValue(a,b ):"money"= =N52.Clien tside.XrmP arent().Pa ge.data.en tity.attri butes.get( a).getAttr ibuteType( )?N52.Clie ntside.Set DecimalVal ue(a,b):"d ouble"==N5 2.Clientsi de.XrmPare nt().Page. data.entit y.attribut es.get(a). getAttribu teType()?N 52.Clients ide.SetDec imalValue( a,b):"bool ean"==N52. Clientside .XrmParent ().Page.da ta.entity. attributes .get(a).ge tAttribute Type()?N52 .Clientsid e.SetBoole anValue(a, b):N52.Cli entside.Se tValue(a,b )}catch(a) {if(a.mess age.indexO f("get_ini tial")>-1| |a.message .indexOf(" add_afterS elect")>-1 ||a.messag e.indexOf( "Object ex pected")>- 1||a.messa ge.indexOf ("null is not an obj ect")>-1)r eturn;pare nt.console .log(a.mes sage),N52. Clientside .DisplayMe ssage("Nor th52 BPA: Failure to complete formula ex ecution:: "+a.messa ge)}},Call FormulaAct ionResult: function(a ,b){try{"h idetabs"== a?N52.Clie ntside.Hid eShowTabs( b,!1):"sho wtabs"==a? N52.Client side.HideS howTabs(b, !0):"expan dtabs"==a? N52.Client side.Expan dCollapseT abs(b,!0): "collapset abs"==a?N5 2.Clientsi de.ExpandC ollapseTab s(b,!1):"h idesection s"==a?N52. Clientside .HideShowS ections(b, !1):"shows ections"== a?N52.Clie ntside.Hid eShowSecti ons(b,!0): "setrequir edfields"= =a?N52.Cli entside.Se tRequiredF ields(b,"r equired"): "setnotreq uiredfield s"==a?N52. Clientside .SetRequir edFields(b ,"none"):" enablefiel ds"==a?N52 .Clientsid e.EnableDi sableField s(b,!1):"s etformnoti fication"= =a?N52.Cli entside.Hi deShowForm Notificati on(b,!0):" clearformn otificatio n"==a?N52. Clientside .HideShowF ormNotific ation(b,!1 ):"setcont rolnotific ation"==a? N52.Client side.HideS howControl Notificati on(b,!0):" clearcontr olnotifica tion"==a?N 52.Clients ide.HideSh owControlN otificatio n(b,!1):"d isablefiel ds"==a?N52 .Clientsid e.EnableDi sableField s(b,!0):"s howfields" ==a?N52.Cl ientside.H ideShowFie lds(b,!0): "hidefield s"==a?N52. Clientside .HideShowF ields(b,!1 ):"showlef thandnavit ems"==a?N5 2.Clientsi de.HideSho wLeftHandN avItems(b, !0):"hidel efthandnav items"==a? N52.Client side.HideS howLeftHan dNavItems( b,!1):"set focus"==a? N52.Client side.SetFo cus(b):"ad dprefilter lookup"==a ?N52.Clien tside.PreF ilterLooku p(b,!0):"r emoveprefi lterlookup "==a?N52.C lientside. PreFilterL ookup(b,!1 ):"execute dialog"==a ?N52.Clien tside.Exec uteDialog( b):"clearf ields"==a? N52.Client side.Clear Fields(b): "alert"==a ?N52.Clien tside.Aler t(b):"aler tclear"==a ?N52.Clien tside.Aler tClear(b): "setpickli stvalues"= =a?N52.Cli entside.Se tPickListV alues(b):" addcustomv iew"==a?N5 2.Clientsi de.AddCust omView(b): "refreshfo rm"==a?N52 .Clientsid e.RefreshF orm(b):"re freshsubgr id"==a?N52 .Clientsid e.RefreshS ubgrid(b): "refreshwe bresource" ==a?N52.Cl ientside.R efreshWebR esource(b) :"setifram e"==a?N52. Clientside .SetIFrame (b):"setde faultview" ==a?N52.Cl ientside.S etDefaultV iew(b):"sa veform"==a ?N52.Clien tside.Save Form(b):"s electform" ==a?N52.Cl ientside.S electForm( b):"openwi ndow"==a?N 52.Clients ide.OpenWi ndow(b):"o penentityf orm"==a?N5 2.Clientsi de.OpenEnt ityForm(b) :"bpsetact iveprocess "==a?N52.C lientside. BPSetActiv eProcess(b ):"bpsetac tivestage" ==a?N52.Cl ientside.B PSetActive Stage(b):" bpmovenext stage"==a? N52.Client side.BPMov eNextStage (b):"bpmov epreviouss tage"==a?N 52.Clients ide.BPMove PreviousSt age(b):"se tclientsid efieldappe nd"==a?N52 .Clientsid e.SetField Append(b): "confirmdi alog"==a&& N52.Client side.Confi rmDialog(b )}catch(a) {if(a.mess age.indexO f("get_ini tial")>-1| |a.message .indexOf(" add_afterS elect")>-1 ||a.messag e.indexOf( "Object ex pected")>- 1||a.messa ge.indexOf ("null is not an obj ect")>-1)r eturn;pare nt.console .log(a.mes sage),N52. Clientside .DisplayMe ssage("Nor th52 BPA: Failure to complete formula ex ecution::: "+a.mess age)}},Cle arFields:f unction(a) {for(i=0;i <a.length; i++)1==N52 .Clientsid e.XrmParen t().Page.g etControl( a[i]).getD isabled()& &N52.Clien tside.XrmP arent().Pa ge.getAttr ibute(a[i] ).setSubmi tMode("alw ays"),N52. Clientside .XrmParent ().Page.ge tAttribute (a[i]).set Value(null ),null!=wi ndow.execu tionContex t&&null!=w indow.exec utionConte xt.getEven tSource()& &"function "==typeof window.exe cutionCont ext.getEve ntSource() .getName&& window.exe cutionCont ext.getEve ntSource() .getName() !=a[i]&&N5 2.Clientsi de.XrmPare nt().Page. getAttribu te(a[i]).f ireOnChang e()},Alert Clear:func tion(a){fo r(N52.Clie ntside.Dis playMessag e(a[0]),i= 1;i<a.leng th;i++)1== N52.Client side.XrmPa rent().Pag e.getContr ol(a[i]).g etDisabled ()&&N52.Cl ientside.X rmParent() .Page.getA ttribute(a [i]).setSu bmitMode(" always"),N 52.Clients ide.XrmPar ent().Page .getAttrib ute(a[i]). setValue(n ull),null! =window.ex ecutionCon text&&null !=window.e xecutionCo ntext.getE ventSource ()&&"funct ion"==type of window. executionC ontext.get EventSourc e().getNam e&&window. executionC ontext.get EventSourc e().getNam e()!=a[i]& &N52.Clien tside.XrmP arent().Pa ge.getAttr ibute(a[i] ).fireOnCh ange();N52 .Clientsid e.XrmParen t().Page.g etControl( a[1]).setF ocus()},Al ert:functi on(a){N52. Clientside .DisplayMe ssage(a[0] )},SetFocu s:function (a){N52.Cl ientside.X rmParent() .Page.getC ontrol(a[0 ]).setFocu s()},Selec tForm:func tion(a){N5 2.Clientsi de.XrmPare nt().Page. ui.formSel ector.item s.get(pars eInt(a[0]) ).navigate ()},SaveFo rm:functio n(a){N52.C lientside. XrmParent( ).Page.dat a.entity.s ave()},Ref reshForm:f unction(a) {"true"==a [0]?N52.Cl ientside.X rmParent() .Page.data .refresh(! 0):N52.Cli entside.Xr mParent(). Page.data. refresh(!1 )},Refresh Subgrid:fu nction(a){ N52.Client side.XrmPa rent().Pag e.getContr ol(a[0]).r efresh()}, RefreshWeb Resource:f unction(a) {var b=N52 .Clientsid e.XrmParen t().Page.g etControl( a[0]).getS rc();b=b.i ndexOf("?" )>-1?b+"&n 52random=" +Math.rand om():b+"?n 52random=" +Math.rand om(),N52.C lientside. XrmParent( ).Page.get Control(a[ 0]).setSrc (b)},SetIF rame:funct ion(a){N52 .Clientsid e.XrmParen t().Page.g etControl( a[0]).setS rc(a[1])}, SetDefault View:funct ion(a){N52 .Clientsid e.XrmParen t().Page.g etControl( a[0]).setD efaultView (a[1])},Hi deShowForm Notificati on:functio n(a,b){1== b?N52.Clie ntside.Xrm Parent().P age.ui.set FormNotifi cation(a[0 ],a[1],a[2 ]):N52.Cli entside.Xr mParent(). Page.ui.cl earFormNot ification( a[0])},Hid eShowContr olNotifica tion:funct ion(a,b){1 ==b?N52.Cl ientside.X rmParent() .Page.getC ontrol(a[0 ]).setNoti fication(a [1]):N52.C lientside. XrmParent( ).Page.get Control(a[ 0]).clearN otificatio n()},HideS howSection s:function (a,b){for( i=0;i<a.le ngth;i++){ var c=a[i] .split("." ),d=c[0],e =c[1];N52. Clientside .XrmParent ().Page.ui .tabs.get( d).section s.get(e).s etVisible( b)}},HideS howLeftHan dNavItems: function(a ,b){for(i= 0;i<a.leng th;i++)N52 .Clientsid e.XrmParen t().Page.u i.navigati on.items.g et(a[i]).s etVisible( b)},Expand CollapseTa bs:functio n(a,b){for (i=0;i<a.l ength;i++) 1==b?N52.C lientside. XrmParent( ).Page.ui. tabs.get(a [i]).setDi splayState ("expanded "):N52.Cli entside.Xr mParent(). Page.ui.ta bs.get(a[i ]).setDisp layState(" collapsed" )},HideSho wTabs:func tion(a,b){ for(i=0;i< a.length;i ++)N52.Cli entside.Xr mParent(). Page.ui.ta bs.get(a[i ]).setVisi ble(b)},Se tRequiredF ields:func tion(a,b){ for(i=0;i< a.length;i ++)N52.Cli entside.Xr mParent(). Page.data. entity.att ributes.ge t(a[i]).se tRequiredL evel(b)},E nableDisab leFields:f unction(a, b){if("*"= =a[0])N52. Clientside .XrmParent ().Page.ui .controls. forEach(fu nction(a,c ){N52.Clie ntside.Doe sControlHa veAttribut e(a)&&a.se tDisabled( b)});else for(i=0;i< a.length;i ++)N52.Cli entside.Xr mParent(). Page.ui.co ntrols.get (a[i]).set Disabled(b )},HideSho wFields:fu nction(a,b ){for(i=0; i<a.length ;i++)N52.C lientside. XrmParent( ).Page.ui. controls.g et(a[i]).s etVisible( b)},OpenWi ndow:funct ion(a){win dow.open(a [0])},Open EntityForm :function( a){var b=a [0],c=a[1] ;"null"==c &&(c=null) ,N52.Clien tside.XrmP arent().Ut ility.open EntityForm (b,c)},BPS etActivePr ocess:func tion(a){N5 2.Clientsi de.XrmPare nt().Page. data.save( ).then(fun ction(){N5 2.Clientsi de.XrmPare nt().Page. data.proce ss.setActi veProcess( a[0],N52.C lientside. BusinessPr ocessCallb ack)},func tion(a){N5 2.Clientsi de.Display Message("E rror Code: "+a.error Code+" Err or Message "+a.messa ge)})},BPS etActiveSt age:functi on(a){N52. Clientside .XrmParent ().Page.da ta.save(). then(funct ion(){N52. Clientside .XrmParent ().Page.da ta.process .setActive Stage(a[0] ,N52.Clien tside.Busi nessProces sCallback) },function (a){N52.Cl ientside.D isplayMess age("Error Code: "+a .errorCode +" Error M essage "+a .message)} )},BPMoveN extStage:f unction(a) {N52.Clien tside.XrmP arent().Pa ge.data.sa ve().then( function() {N52.Clien tside.XrmP arent().Pa ge.data.pr ocess.move Next(N52.C lientside. BusinessPr ocessCallb ack)},func tion(a){N5 2.Clientsi de.Display Message("E rror Code: "+a.error Code+" Err or Message "+a.messa ge)})},BPM ovePreviou sStage:fun ction(a){N 52.Clients ide.XrmPar ent().Page .data.save ().then(fu nction(){N 52.Clients ide.XrmPar ent().Page .data.proc ess.movePr evious(N52 .Clientsid e.Business ProcessCal lback)},fu nction(a){ N52.Client side.Displ ayMessage( "Error Cod e: "+a.err orCode+" E rror Messa ge "+a.mes sage)})},B usinessPro cessCallba ck:functio n(a){"succ ess"!=a&&N 52.Clients ide.Displa yMessage(a )},SetBool eanValue:f unction(a, b){var c=" true"==b[0 ].toLowerC ase()||"1" ==b[0].toL owerCase() ;1==N52.Cl ientside.X rmParent() .Page.getC ontrol(a). getDisable d()&&N52.C lientside. XrmParent( ).Page.get Attribute( a).setSubm itMode("al ways"),N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).s etValue(c) ,null!=win dow.execut ionContext &&null!=wi ndow.execu tionContex t.getEvent Source()&& "function" ==typeof w indow.exec utionConte xt.getEven tSource(). getName&&w indow.exec utionConte xt.getEven tSource(). getName()! =b[i]&&N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).f ireOnChang e()},SetDe cimalValue :function( a,b){1==N5 2.Clientsi de.XrmPare nt().Page. getControl (a).getDis abled()&&N 52.Clients ide.XrmPar ent().Page .getAttrib ute(a).set SubmitMode ("always") ,N52.Clien tside.XrmP arent().Pa ge.data.en tity.attri butes.get( a).setValu e(parseFlo at(b[0].re place(",", "."))),nul l!=window. executionC ontext&&nu ll!=window .execution Context.ge tEventSour ce()&&"fun ction"==ty peof windo w.executio nContext.g etEventSou rce().getN ame&&windo w.executio nContext.g etEventSou rce().getN ame()!=b[i ]&&N52.Cli entside.Xr mParent(). Page.data. entity.att ributes.ge t(a).fireO nChange()} ,SetIntege rValue:fun ction(a,b) {1==N52.Cl ientside.X rmParent() .Page.getC ontrol(a). getDisable d()&&N52.C lientside. XrmParent( ).Page.get Attribute( a).setSubm itMode("al ways"),N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).s etValue(pa rseInt(b[0 ])),null!= window.exe cutionCont ext&&null! =window.ex ecutionCon text.getEv entSource( )&&"functi on"==typeo f window.e xecutionCo ntext.getE ventSource ().getName &&window.e xecutionCo ntext.getE ventSource ().getName ()!=b[i]&& N52.Client side.XrmPa rent().Pag e.data.ent ity.attrib utes.get(a ).fireOnCh ange()},Se tValue:fun ction(a,b) {1==N52.Cl ientside.X rmParent() .Page.getC ontrol(a). getDisable d()&&N52.C lientside. XrmParent( ).Page.get Attribute( a).setSubm itMode("al ways"),N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).s etValue(b[ 0]),null!= window.exe cutionCont ext&&null! =window.ex ecutionCon text.getEv entSource( )&&"functi on"==typeo f window.e xecutionCo ntext.getE ventSource ().getName &&window.e xecutionCo ntext.getE ventSource ().getName ()!=b[i]&& N52.Client side.XrmPa rent().Pag e.data.ent ity.attrib utes.get(a ).fireOnCh ange()},Se tFieldAppe nd:functio n(a){1==N5 2.Clientsi de.XrmPare nt().Page. getControl (a[0]).get Disabled() &&N52.Clie ntside.Xrm Parent().P age.getAtt ribute(a[0 ]).setSubm itMode("al ways"),N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a[0] ).setValue (N52.Clien tside.XrmP arent().Pa ge.data.en tity.attri butes.get( a[0]).getV alue()+a[1 ]),null!=w indow.exec utionConte xt&&null!= window.exe cutionCont ext.getEve ntSource() &&"functio n"==typeof window.ex ecutionCon text.getEv entSource( ).getName& &window.ex ecutionCon text.getEv entSource( ).getName( )!=a[i]&&N 52.Clients ide.XrmPar ent().Page .data.enti ty.attribu tes.get(a[ 0]).fireOn Change()}, SetDateTim eValue:fun ction(a,b) {var c=par seInt(b[0] ),d=parseI nt(b[1]),e =parseInt( b[2]),f=pa rseInt(b[3 ]),g=parse Int(b[4]), h=parseInt (b[5]),j=n ew Date(Da te.UTC(c,d ,e,f,g,h)) ;1==N52.Cl ientside.X rmParent() .Page.getC ontrol(a). getDisable d()&&N52.C lientside. XrmParent( ).Page.get Attribute( a).setSubm itMode("al ways"),N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).s etValue(j) ,null!=win dow.execut ionContext &&null!=wi ndow.execu tionContex t.getEvent Source()&& "function" ==typeof w indow.exec utionConte xt.getEven tSource(). getName&&w indow.exec utionConte xt.getEven tSource(). getName()! =b[i]&&N52 .Clientsid e.XrmParen t().Page.d ata.entity .attribute s.get(a).f ireOnChang e()},Confi rmDialog:f unction(a) {N52.Clien tside.XrmP arent().Ut ility.conf irmDialog( a[0],funct ion(){},fu nction(){} )},AddCust omView:fun ction(a){v ar b=N52.C lientside. GuidLikeId (),c=a[0], d=a[1],e=a [2],f=a[3] ,g=a[4],h= "true"==a[ 5].toLower Case(),i=N 52.Clients ide.XrmPar ent().Page .ui.contro ls.get(c); i.addCusto mView(b,d, e,f,g,h)}, GuidLikeId :function( ){var a=fu nction(){r eturn Math .floor(655 36*Math.ra ndom()).to String(16) };return"{ "+(a()+a() +"-"+a()+" -"+a()+"-" +a()+"-"+a ()+a()+a() )+"}"},Htm lDecode:fu nction(s){ var out="" ;if(null!= s){for(var l=s.lengt h,i=0;i<l; i++){var c h=s.charAt (i);if("&" ==ch){var semicolonI ndex=s.ind exOf(";",i +1);if(sem icolonInde x>0){var e ntity=s.su bstring(i+ 1,semicolo nIndex);if (entity.le ngth>1&&"# "==entity. charAt(0)) ch="x"==en tity.charA t(1)||"X"= =entity.ch arAt(1)?St ring.fromC harCode(ev al("0"+ent ity.substr ing(1))):S tring.from CharCode(e val(entity .substring (1)));else switch(en tity){case "lt":ch=St ring.fromC harCode(60 );break;ca se"gt":ch= String.fro mCharCode( 62);break; case"nbsp" :ch=String .fromCharC ode(160);b reak;defau lt:ch=""}i =semicolon Index}}out +=ch}retur n out}},Se tPickListV alues:func tion(a){va r d,b=a[0] ,c=a[1],e= "n52Pickli st"+b,f=N5 2.Clientsi de.XrmPare nt().Page. getControl (b).getAtt ribute().g etValue(), g=!1;for(n ull!=windo w[e]?d=win dow[e]:(d= N52.Client side.XrmPa rent().Pag e.getContr ol(b).getA ttribute() .getOption s(),window [e]=d),N52 .Clientsid e.XrmParen t().Page.g etControl( b).clearOp tions(),x= 2;x<a.leng th;x++){va r h=a[x].s plit(","). map(Functi on.prototy pe.call,St ring.proto type.trim) .filter(fu nction(a,b ,c){return c.indexOf (a.trim()) ===b});if( h.length>1 )for(z=0;z <h.length; z++)for(va r j in d)d [j].value= =h[z].trim ()&&(N52.C lientside. XrmParent( ).Page.get Control(b) .addOption (d[j]),h[z ].trim()== f&&(g=!0)) ;else for( var j in d )d[j].valu e==a[x]&&( N52.Client side.XrmPa rent().Pag e.getContr ol(b).addO ption(d[j] ),a[x]==f& &(g=!0))}a .length>2& &N52.Clien tside.XrmP arent().Pa ge.getCont rol(b).get Attribute( ).setValue (a[2]),"fa lse"==c.to LowerCase( )?(N52.Cli entside.Xr mParent(). Page.getCo ntrol(b).r emoveOptio n(""),N52. Clientside .XrmParent ().Page.ge tControl(b ).getAttri bute().set Value(a[2] )):N52.Cli entside.Xr mParent(). Page.getCo ntrol(b).g etAttribut e().setVal ue(""),1== g&&N52.Cli entside.Xr mParent(). Page.getCo ntrol(b).g etAttribut e().setVal ue(f),null !=window.e xecutionCo ntext&&nul l!=window. executionC ontext.get EventSourc e()&&"func tion"==typ eof window .execution Context.ge tEventSour ce().getNa me&&window .execution Context.ge tEventSour ce().getNa me()!=a[i] &&N52.Clie ntside.Xrm Parent().P age.getCon trol(b).ge tAttribute ().fireOnC hange()},E xecuteDial og:functio n(a){var b =N52.REST. _getServer Url();b+=" /cs/dialog /rundialog .aspx?Dial ogId=%7B"+ a[0]+"%7D& EntityName ="+N52.Cli entside.Xr mParent(). Page.data. entity.get EntityName ()+"&Objec tId="+N52. Clientside .XrmParent ().Page.da ta.entity. getId(),wi ndow.open( b,"","stat us=no, scr ollbars=no , toolbars =no, menub ar=no, loc ation=no") },PreFilte rLookup:fu nction(a,b ){1==b&&nu ll==window ["n52filte rKey"+a[0] ]?(N52.Cli entside.Xr mParent(). Page.getCo ntrol(a[0] ).removePr eSearch(N5 2.Clientsi de.AddFilt er),N52.Cl ientside.X rmParent() .Page.getC ontrol(a[0 ]).addPreS earch(N52. Clientside .AddFilter ),window[" n52filterK ey"+a[0]]= a[1]):0==b ?(N52.Clie ntside.Xrm Parent().P age.getCon trol(a[0]) .removePre Search(N52 .Clientsid e.AddFilte r),null==w indow["n52 filterKey" +a[0]]):"" ==a[3]?N52 .Clientsid e.XrmParen t().Page.g etControl( a[0]).addC ustomFilte r(a[2]):N5 2.Clientsi de.XrmPare nt().Page. getControl (a[0]).add CustomFilt er(a[2],a[ 3])},AddFi lter:funct ion(a){var b=a.getEv entSource( ).getName( ),d="",e=w indow["n52 filterKey" +b];d="und efined"!=t ypeof N52. Clientside .XrmParent ().Page.co ntext.clie nt&&"Mobil e"==N52.Cl ientside.X rmParent() .Page.cont ext.client .getClient ()?N52.Cli entside.Ge tDataXml() :N52.Clien tside.XrmP arent().Pa ge.data.en tity.getDa taXml();va r f=N52.Cl ientside.G etFields(e );d=N52.Cl ientside.R educePayLo ad(d,f),d= N52.Client side.Optim izePayLoad (d);var g= "$select=n orth52_Res ult&$filte r=north52_ name eq '" +e+"' and north52_Pa rameters e q '"+d+"' and north5 2_TargetEn tityID eq '"+N52.Cli entside.Xr mParent(). Page.data. entity.get Id()+"' an d north52_ FormulaTyp e eq '"+N5 2.Clientsi de.XrmPare nt().Page. ui.getForm Type()+"'" ;N52.REST. retrieveMu ltipleReco rdsSync("n orth52_for mulacalcul ation",g,N 52.Clients ide.Retrie veFormulaC allBack,fu nction(a){ parent.con sole.log(a .message), N52.Client side.Displ ayMessage( "North52 B PA: An err or has occ urred plea se contact your syst em adminis trator.")} ,N52.Clien tside.Form ulasRetrie veComplete )},assignR esponse:fu nction(a){ if(4==a.re adyState&& 200==a.sta tus);},Get XmlDocumen tLocal:fun ction(a){v ar b;if("u ndefined"! =typeof wi ndow.Activ eXObject&& new window .ActiveXOb ject("Micr osoft.XMLD OM"))b=fun ction(a){v ar b=new w indow.Acti veXObject( "Microsoft .XMLDOM"); return b.a sync="fals e",b.loadX ML(a),b};e lse{if("un defined"== typeof win dow.DOMPar ser)throw new Error( "North52: No XML par ser found" );b=functi on(a){retu rn(new win dow.DOMPar ser).parse FromString (a,"text/x ml")}}var c=b(a);ret urn c},Opt imizePayLo ad:functio n(a){var b =a.replace (new RegEx p(' name=" "',"g"),"" );b=b.repl ace(new Re gExp("< ;","g"),"% 3C"),b=b.r eplace(new RegExp("& #62;","g") ,"%3E"),b= b.replace( new RegExp ("""," g"),"%22") ,b=N52.Cli entside.Ht mlDecode(b ),b=b.repl ace(new Re gExp("&"," g"),"%26") ,b=b.repla ce(new Reg Exp("'","g "),"%27"), b=b.replac e(new RegE xp("#","g" ),"%23");v ar c=N52.C lientside. GetXmlDocu mentLocal( b),d=c.doc umentEleme nt.childNo des;for(i= 0;i<d.leng th;i++){va r e="",f=N 52.Clients ide.XmlToS tring(d[i] ),g="</"+d [i].nodeNa me+">",h=" @@";e="und efined"!== d[i].text? d[i].text: d[i].textC ontent;var j=encodeU RIComponen t(e),k=f.r eplace(e,j );b=b.repl ace(f,k),b =b.replace (g,h)}retu rn b=b.rep lace(new R egExp("%26 ","g"),"%2 526"),b=b. replace(ne w RegExp(" %27","g"), "%2527"),b =b.replace (new RegEx p("%3C","g "),"%253C" ),b=b.repl ace(new Re gExp("%3E" ,"g"),"%25 3E"),b=b.r eplace(new RegExp("% 22","g")," %2522"),b= b.replace( new RegExp ("%23","g" ),"%2523") },ReducePa yLoad:func tion(a,b){ var c=a;if (b.length> 0){var d=N 52.Clients ide.GetXml DocumentLo cal(a),e=d .documentE lement.chi ldNodes;fo r(i=0;i<e. length;i++ )if(!(b.in dexOf(e[i] .nodeName) >-1)){var f=a.indexO f("<"+e[i] .nodeName) ,g=a.index Of("</"+e[ i].nodeNam e+">")+e[i ].nodeName .length+3, h=a.slice( f,g);c=c.r eplace(h," ")}}return c},GetFie lds:functi on(a){for( var b=new Array,c=a. split("|") ,d=0;d<c.l ength;d++) if(c[d].sp lit(":").l ength>1){v ar e=c[d]. split(":") [1];if("*" ==e)contin ue;N52.Cli entside.Xr mParent(). Page.ui.co ntrols.for Each(funct ion(a,c){n ull!=a.get Parent()&& null!=a.ge tParent(). getParent( )&&a.getPa rent().get Parent().g etName()== e&&b.push( a.getName( ))})}retur n b},GetFo rmulas:fun ction(a){f or(var b=" ",c=a.spli t("|"),d=0 ;d<c.lengt h;d++){if( c[d].split (":").leng th>2){var e=c[d].spl it(":")[2] ;if("Creat e"==e&&2== N52.Client side.XrmPa rent().Pag e.ui.getFo rmType())c ontinue;if ("Update"= =e&&(1==N5 2.Clientsi de.XrmPare nt().Page. ui.getForm Type()||5= =N52.Clien tside.XrmP arent().Pa ge.ui.getF ormType()) )continue} b=b+c[d].s plit(":")[ 0]+"|"}ret urn b.subs tring(0,b. length-1)} ,RegisterE vents:func tion(a){fo r(var b=a. split("|") ,c=0;c<b.l ength;c++) if(b[c].sp lit(":").l ength>3){v ar d=b[c]. split(":") [3];if("st ageid"==d) {window.n5 2stageid=b [c].split( ":")[0],N5 2.Clientsi de.XrmPare nt().Page. data.proce ss.addOnSt ageChange( N52.Client side.Execu teStageCha nge);break }}},ExitSa veMode:fun ction(a,b) {var c=!0, d=a.split( "|");if(nu ll==b.getE ventArgs() )return!1; var e=b.ge tEventArgs ().getSave Mode();if( d[0].split (":").leng th>4)for(v ar f=d[0]. split(":") [4],g=0;g< =f.split(" ;").length ;g++)0!=f. split(";") [g]&&f.spl it(";")[g] !=e||(c=!1 );else c=! 1;return c },GetPayLo adElement: function(a ){var b="2 17890000", c=window.a rgsFormula .split("|" );return c [0].split( ":").lengt h>a&&(b=c[ 0].split(" :")[a]),b} ,ExecuteSt ageChange: function(a ){var c="" ,d=window. n52stageid ;c="undefi ned"!=type of N52.Cli entside.Xr mParent(). Page.conte xt.client& &"Mobile"= =N52.Clien tside.XrmP arent().Pa ge.context .client.ge tClient()? N52.Client side.GetDa taXml():N5 2.Clientsi de.XrmPare nt().Page. data.entit y.getDataX ml();var e =N52.Clien tside.GetF ields(d);c =N52.Clien tside.Redu cePayLoad( c,e),c=N52 .Clientsid e.Optimize PayLoad(c) ;var f="$s elect=nort h52_Result &$filter=n orth52_nam e eq '"+d+ "' and nor th52_Param eters eq ' "+c+"' and north52_T argetEntit yID eq '"+ N52.Client side.XrmPa rent().Pag e.data.ent ity.getId( )+"' and n orth52_For mulaType e q '"+N52.C lientside. XrmParent( ).Page.ui. getFormTyp e()+"'";N5 2.REST.ret rieveMulti pleRecords Sync("nort h52_formul acalculati on",f,N52. Clientside .RetrieveF ormulaCall Back,funct ion(a){par ent.consol e.log(a.me ssage),N52 .Clientsid e.DisplayM essage("No rth52 BPA: An error has occurr ed please contact yo ur system administra tor.")},N5 2.Clientsi de.Formula sRetrieveC omplete)}, XmlToStrin g:function (a){if("un defined"!= typeof a.x ml)return a.xml;if(" undefined" !=typeof X MLSerializ er){var b= new XMLSer ializer;re turn b.ser ializeToSt ring(a)}re turn""},Bu ildFormula Args:funct ion(a){for (var b="", c=1;c<a.le ngth;c++)b +=a[c]+"|" ;return b} ,GetDataXm l:function (){var a=" <"+N52.Cli entside.Xr mParent(). Page.data. entity.get EntityName ()+">XRepl acePointX< /"+N52.Cli entside.Xr mParent(). Page.data. entity.get EntityName ()+">";ret urn N52.Cl ientside.X rmParent() .Page.data .entity.at tributes.f orEach(fun ction(b,c) {if(1==b.g etIsDirty( )||1==N52. Clientside .XrmParent ().Page.ui .getFormTy pe()&&null !=b.getVal ue()){var d=b.getVal ue();if(nu ll==d)a=a. replace("X ReplacePoi ntX","XRep lacePointX <"+b.getNa me()+"/>") ;else if(a .indexOf(" <"+b.getNa me())>-1)a =a;else if ("lookup"= =b.getAttr ibuteType( ))if("unde fined"!=ty peof b.get IsPartyLis t&&1==b.ge tIsPartyLi st())a=a;e lse{var e= d[0].name. replace(ne w RegExp(" <","g"),"& #60;");e=e .replace(n ew RegExp( ">","g")," >"),e= e.replace( new RegExp ('"',"g"), """),a =a.replace ("XReplace PointX","X ReplacePoi ntX<"+b.ge tName()+' name="'+e+ '" type="' +d[0].type +'">'+d[0] .id+"</"+b .getName() +">")}else "datetime" ==N52.Clie ntside.Xrm Parent().P age.data.e ntity.attr ibutes.get (b.getName ()).getAtt ributeType ()&&(d=d.t oISOString ()),"boole an"==N52.C lientside. XrmParent( ).Page.dat a.entity.a ttributes. get(b.getN ame()).get AttributeT ype()&&(d= 1==d?"1":" 0"),d=Stri ng(d).repl ace(new Re gExp("<"," g"),"< "),d=Strin g(d).repla ce(new Reg Exp(">","g "),">" ),a=a.repl ace("XRepl acePointX" ,"XReplace PointX<"+b .getName() +">"+Strin g(d)+"</"+ b.getName( )+">")}}), a=a.replac e("XReplac ePointX"," ")},DoesCo ntrolHaveA ttribute:f unction(a) {var b=a.g etControlT ype();retu rn"iframe" !=b&&"webr esource"!= b&&"subgri d"!=b},Dis playMessag e:function (a){"undef ined"==typ eof N52.Cl ientside.X rmParent() .Page.ui.c learFormNo tification ?alert(a): N52.Client side.XrmPa rent().Uti lity.alert Dialog(a)} ,XrmParent :function( ){return"u ndefined"= =typeof Xr m||null==X rm.Page.da ta?parent. Xrm:Xrm},S etLookupVa lue:functi on(a,b){va r c=new Ar ray;c[0]=n ew Object, c[0].id=b[ 1],c[0].na me=b[2],c[ 0].entityT ype=b[0],1 ==N52.Clie ntside.Xrm Parent().P age.getCon trol(a).ge tDisabled( )&&N52.Cli entside.Xr mParent(). Page.getAt tribute(a) .setSubmit Mode("alwa ys"),N52.C lientside. XrmParent( ).Page.get Attribute( a).setValu e(c),null! =window.ex ecutionCon text&&null !=window.e xecutionCo ntext.getE ventSource ()&&"funct ion"==type of window. executionC ontext.get EventSourc e().getNam e&&window. executionC ontext.get EventSourc e().getNam e()!=b[i]& &N52.Clien tside.XrmP arent().Pa ge.data.en tity.attri butes.get( a).fireOnC hange()}}; |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.