⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isc_salesforce.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 4 页
字号:
}),isc.WSDLMessage.create({ID:"message:ApiFault",fields:{fault:{type:"ApiFault",xmlRequired:true,name:"fault"}}}),isc.WSDLMessage.create({ID:"message:LoginFault",fields:{LoginFault:{type:"LoginFault",xmlRequired:true,name:"LoginFault"}}}),isc.WSDLMessage.create({ID:"message:InvalidQueryLocatorFault",fields:{InvalidQueryLocatorFault:{type:"InvalidQueryLocatorFault",xmlRequired:true,name:"InvalidQueryLocatorFault"}}}),isc.WSDLMessage.create({ID:"message:InvalidNewPasswordFault",fields:{InvalidNewPasswordFault:{type:"InvalidNewPasswordFault",xmlRequired:true,name:"InvalidNewPasswordFault"}}}),isc.WSDLMessage.create({ID:"message:InvalidIdFault",fields:{InvalidIdFault:{type:"InvalidIdFault",xmlRequired:true,name:"InvalidIdFault"}}}),isc.WSDLMessage.create({ID:"message:UnexpectedErrorFault",fields:{UnexpectedErrorFault:{type:"UnexpectedErrorFault",xmlRequired:true,name:"UnexpectedErrorFault"}}}),isc.WSDLMessage.create({ID:"message:InvalidFieldFault",fields:{InvalidFieldFault:{type:"InvalidFieldFault",xmlRequired:true,name:"InvalidFieldFault"}}}),isc.WSDLMessage.create({ID:"message:InvalidSObjectFault",fields:{InvalidSObjectFault:{type:"InvalidSObjectFault",xmlRequired:true,name:"InvalidSObjectFault"}}}),isc.WSDLMessage.create({ID:"message:MalformedQueryFault",fields:{MalformedQueryFault:{type:"MalformedQueryFault",xmlRequired:true,name:"MalformedQueryFault"}}}),isc.WSDLMessage.create({ID:"message:MalformedSearchFault",fields:{MalformedSearchFault:{type:"MalformedSearchFault",xmlRequired:true,name:"MalformedSearchFault"}}}),isc.WSDLMessage.create({ID:"message:loginRequest",fields:{login:{type:"login",xmlRequired:true,name:"login"}}}),isc.WSDLMessage.create({ID:"message:loginResponse",fields:{loginResponse:{type:"loginResponse",xmlRequired:true,name:"loginResponse"}}}),isc.WSDLMessage.create({ID:"message:describeSObjectRequest",fields:{describeSObject:{type:"describeSObject",xmlRequired:true,name:"describeSObject"}}}),isc.WSDLMessage.create({ID:"message:describeSObjectResponse",fields:{describeSObjectResponse:{type:"describeSObjectResponse",xmlRequired:true,name:"describeSObjectResponse"}}}),isc.WSDLMessage.create({ID:"message:describeSObjectsRequest",fields:{describeSObjects:{type:"describeSObjects",xmlRequired:true,name:"describeSObjects"}}}),isc.WSDLMessage.create({ID:"message:describeSObjectsResponse",fields:{describeSObjectsResponse:{type:"describeSObjectsResponse",xmlRequired:true,name:"describeSObjectsResponse"}}}),isc.WSDLMessage.create({ID:"message:describeGlobalRequest",fields:{describeGlobal:{type:"describeGlobal",xmlRequired:true,name:"describeGlobal"}}}),isc.WSDLMessage.create({ID:"message:describeGlobalResponse",fields:{describeGlobalResponse:{type:"describeGlobalResponse",xmlRequired:true,name:"describeGlobalResponse"}}}),isc.WSDLMessage.create({ID:"message:describeLayoutRequest",fields:{describeLayout:{type:"describeLayout",xmlRequired:true,name:"describeLayout"}}}),isc.WSDLMessage.create({ID:"message:describeLayoutResponse",fields:{describeLayoutResponse:{type:"describeLayoutResponse",xmlRequired:true,name:"describeLayoutResponse"}}}),isc.WSDLMessage.create({ID:"message:describeTabsRequest",fields:{describeTabs:{type:"describeTabs",xmlRequired:true,name:"describeTabs"}}}),isc.WSDLMessage.create({ID:"message:describeTabsResponse",fields:{describeTabsResponse:{type:"describeTabsResponse",xmlRequired:true,name:"describeTabsResponse"}}}),isc.WSDLMessage.create({ID:"message:createRequest",fields:{create:{type:"create",xmlRequired:true,name:"create"}}}),isc.WSDLMessage.create({ID:"message:createResponse",fields:{createResponse:{type:"createResponse",xmlRequired:true,name:"createResponse"}}}),isc.WSDLMessage.create({ID:"message:updateRequest",fields:{update:{type:"update",xmlRequired:true,name:"update"}}}),isc.WSDLMessage.create({ID:"message:updateResponse",fields:{updateResponse:{type:"updateResponse",xmlRequired:true,name:"updateResponse"}}}),isc.WSDLMessage.create({ID:"message:deleteRequest",fields:{"delete":{type:"delete",xmlRequired:true,name:"delete"}}}),isc.WSDLMessage.create({ID:"message:deleteResponse",fields:{deleteResponse:{type:"deleteResponse",xmlRequired:true,name:"deleteResponse"}}}),isc.WSDLMessage.create({ID:"message:retrieveRequest",fields:{retrieve:{type:"retrieve",xmlRequired:true,name:"retrieve"}}}),isc.WSDLMessage.create({ID:"message:retrieveResponse",fields:{retrieveResponse:{type:"retrieveResponse",xmlRequired:true,name:"retrieveResponse"}}}),isc.WSDLMessage.create({ID:"message:convertLeadRequest",fields:{convertLead:{type:"convertLead",xmlRequired:true,name:"convertLead"}}}),isc.WSDLMessage.create({ID:"message:convertLeadResponse",fields:{convertLeadResponse:{type:"convertLeadResponse",xmlRequired:true,name:"convertLeadResponse"}}}),isc.WSDLMessage.create({ID:"message:getDeletedRequest",fields:{getDeleted:{type:"getDeleted",xmlRequired:true,name:"getDeleted"}}}),isc.WSDLMessage.create({ID:"message:getDeletedResponse",fields:{getDeletedResponse:{type:"getDeletedResponse",xmlRequired:true,name:"getDeletedResponse"}}}),isc.WSDLMessage.create({ID:"message:getUpdatedRequest",fields:{getUpdated:{type:"getUpdated",xmlRequired:true,name:"getUpdated"}}}),isc.WSDLMessage.create({ID:"message:getUpdatedResponse",fields:{getUpdatedResponse:{type:"getUpdatedResponse",xmlRequired:true,name:"getUpdatedResponse"}}}),isc.WSDLMessage.create({ID:"message:queryRequest",fields:{query:{type:"query",xmlRequired:true,name:"query"}}}),isc.WSDLMessage.create({ID:"message:queryResponse",fields:{queryResponse:{type:"queryResponse",xmlRequired:true,name:"queryResponse"}}}),isc.WSDLMessage.create({ID:"message:queryMoreRequest",fields:{queryMore:{type:"queryMore",xmlRequired:true,name:"queryMore"}}}),isc.WSDLMessage.create({ID:"message:queryMoreResponse",fields:{queryMoreResponse:{type:"queryMoreResponse",xmlRequired:true,name:"queryMoreResponse"}}}),isc.WSDLMessage.create({ID:"message:searchRequest",fields:{search:{type:"search",xmlRequired:true,name:"search"}}}),isc.WSDLMessage.create({ID:"message:searchResponse",fields:{searchResponse:{type:"searchResponse",xmlRequired:true,name:"searchResponse"}}}),isc.WSDLMessage.create({ID:"message:getServerTimestampRequest",fields:{getServerTimestamp:{type:"getServerTimestamp",xmlRequired:true,name:"getServerTimestamp"}}}),isc.WSDLMessage.create({ID:"message:getServerTimestampResponse",fields:{getServerTimestampResponse:{type:"getServerTimestampResponse",xmlRequired:true,name:"getServerTimestampResponse"}}}),isc.WSDLMessage.create({ID:"message:setPasswordRequest",fields:{setPassword:{type:"setPassword",xmlRequired:true,name:"setPassword"}}}),isc.WSDLMessage.create({ID:"message:setPasswordResponse",fields:{setPasswordResponse:{type:"setPasswordResponse",xmlRequired:true,name:"setPasswordResponse"}}}),isc.WSDLMessage.create({ID:"message:resetPasswordRequest",fields:{resetPassword:{type:"resetPassword",xmlRequired:true,name:"resetPassword"}}}),isc.WSDLMessage.create({ID:"message:resetPasswordResponse",fields:{resetPasswordResponse:{type:"resetPasswordResponse",xmlRequired:true,name:"resetPasswordResponse"}}}),isc.WSDLMessage.create({ID:"message:getUserInfoRequest",fields:{getUserInfo:{type:"getUserInfo",xmlRequired:true,name:"getUserInfo"}}}),isc.WSDLMessage.create({ID:"message:getUserInfoResponse",fields:{getUserInfoResponse:{type:"getUserInfoResponse",xmlRequired:true,name:"getUserInfoResponse"}}})]})isc.SForce=isc.WebService.get("urn:partner.soap.sforce.com");if(isc.SForce){isc.A=isc.SForce.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.detailFields=["Id","Type","ParentId","LastModifiedDate","LastModifiedById","LastActivityDate","CreatedDate","CreatedById"];isc.A.hiddenFields=["SystemModstamp"];isc.B.push(isc.A.getHeaderData=function(_1){var _2={};if(_1.operationType=="fetch")_2.QueryOptions={batchSize:75};if(this.sessionId!=null)_2.SessionHeader={sessionId:this.sessionId};return _2},isc.A.login=function(_1,_2,_3){this.callOperation("login",{username:_1,password:_2},"//default:result",{target:this,methodName:"loginReply"},{willHandleError:true,$40z:_3,showPrompt:true,prompt:"Logging into SalesForce.."})},isc.A.loginReply=function(_1,_2,_3,_4){if(_3.status<0){return this.fireCallback(_4.$40z,"loginData",[false])}var _5=_1[0];this.logDebug("login data: "+this.echo(_5));this.dataURL=_5.serverUrl;this.sessionId=_5.sessionId;this.logInfo("got sessionID: "+this.sessionId);this.fireCallback(_4.$40z,"loginData",[_5])},isc.A.ensureLoggedIn=function(_1,_2){if(this.sessionId)return this.fireCallback(_1);var _3=this;isc.showLoginDialog(function(_4,_5){if(_4==null)return;_3.login(_4.username,_4.password,function(_6){_5(_6);if(_6)isc.Class.fireCallback(_1)})},{title:"Please log in to SalesForce",dismissable:_2})},isc.A.getEntityList=function(_1){this.$400=_1;this.callOperation("describeGlobal",null,"//default:types",{target:this,methodName:"describeGlobalReply"})},isc.A.describeGlobalReply=function(_1){this.fireCallback(this.$400,"list",[_1])},isc.A.getEntity=function(_1,_2){var _3=this;this.callOperation("describeSObjects",{sObjectType:_1},null,function(_4){_3.describeObjectReply(_4,_1,_2)})},isc.A.describeObjectReply=function(_1,_2,_3){var _4=_1.result,_5=_4.fields;var _6=this.convertSchema(_4,_2);if(this.logIsDebugEnabled()){this.logDebug("converted schema: "+this.echoAll(_6.getFields()))}_6.sfFields=_4.fields;this.fireCallback(_3,"schema",[_6])},isc.A.convertSchema=function(_1,_2){var _3=_1.fields,_4=[];for(var i=0;i<_3.length;i++){var _6=_3[i],_7={};_7.name=_6.name;if(this.detailFields.contains(_7.name))_7.detail=true;if(this.hiddenFields.contains(_7.name))_7.hidden=true;var _8=_6.soapType;if(_8.contains(":"))_8=_8.substring(_8.indexOf(":")+1);_7.type=_8;_7.title=_6.label;_7.canEdit=_6.updateable;if(_6.type=="id")_7.primaryKey=true;if(_6.length!=0)_7.length=_6.length;_4.add(_7)}var _9=_1.childRelationships,_10=[];if(_9){for(var i=0;i<_9.length;i++){var _11=_9[i];_10.add({dsName:_11.childSObject,fieldName:_11.field})}}return isc.SFDataSource.create({sfName:_1.name,ID:_2,childRelations:_10,fields:_4})},isc.A.deploySControl=function(_1,_2){if(this.SControlDS==null){this.getEntity("SControl",function(_3){isc.SForce.SControlDS=_3;isc.SForce.deploySControl(_1,_2)});return}var _3=this.SControlDS;_3.fetchData({Name:_1},function(_4,_5){isc.SForce.installSControl(_1,_2,_5,_3)})},isc.A.installSControl=function(_1,_2,_3,_4){var _5=this.getSControlHTML(_2);if(_3.length>0){_4.updateData({Id:_3[0].Id,HTMLWrapper:_5})}else{_4.addData({Name:_1,HTMLWrapper:_5})}},isc.A.getSControlHTML=function(_1){if(this.htmlPrefix==null){var _2=this.controlIsomorphicDir;this.htmlPrefix=["<HTML>\r<BODY>\r<SCRIPT>window.isomorphicDir = '",_2,"'</SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Core.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Foundation.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Containers.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Grids.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Forms.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_DataBinding.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_SalesForce.js'></SCRIPT>\r","<SCRIPT src='",_2,"system/modules/ISC_Kapow.js'></SCRIPT>\r","<SCRIPT src='",_2,"skins/",this.controlSkin,"/load_skin.js'></SCRIPT>\r","<SCRIPT>\r",'   var service = isc.WebService.get("urn:partner.soap.sforce.com");\r','   service.sessionId = "{!User_Session_ID}";\r','   service.dataURL = "{!API_Partner_Server_URL_60}";\r\r'].join("")}return this.htmlPrefix+_1+'</SCRIPT>\r</BODY></HTML>'});isc.B._maxIndex=isc.C+12;isc.defineClass("SFResultSet","ResultSet");isc.A=isc.SFResultSet.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.transformData=function(_1,_2){this.context=this.context||{};this.context.queryLocator=_2.queryLocator},isc.A.setCriteria=function(_1){var _2=this.Super("setCriteria",arguments);if(_2){this.context=this.context||{};this.context.queryLocator=null}});isc.B._maxIndex=isc.C+2;isc.defineClass("SFDataSource","DataSource");isc.A=isc.SFDataSource.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.serviceNamespace="urn:partner.soap.sforce.com";isc.A.operationBindings=[{operationType:"fetch",wsOperation:"query",recordXPath:"//schema:records"},{operationType:"fetch",operationId:"queryMore",wsOperation:"queryMore",recordXPath:"//schema:records"},{operationType:"update",wsOperation:"update",recordName:"SaveResult"},{operationType:"add",wsOperation:"create",recordName:"SaveResult"},{operationType:"remove",wsOperation:"delete",recordName:"DeleteResult"}];isc.A.resultSetClass="SFResultSet";isc.A.autoLogin=true;isc.B.push(isc.A.transformRequest=function(_1){var _2=_1.data;if(!isc.isAn.Array(_2))_2=[_2];if(_1.operationType=="remove"){return{ids:_2.getProperty("Id")}}if(_1.operationType!="fetch"){_2.setProperty("type",this.sfName||this.ID);return{sObjects:_2}}if(_1.queryLocator){_1.operationId="queryMore";return{queryLocator:_1.queryLocator}}var _3=_1.data,_4="select "+this.getFieldNames().join(",")+" "+"from "+(this.sfName||this.ID);if(_3!=null&&!isc.isAn.emptyObject(_3)){_4+=" where ";for(var _5 in _3){_4+=_5+"='"+_3[_5]+"' "}}return{queryString:_4}},isc.A.transformResponse=function(_1,_2,_3){var _4=_2.operationType;if(_4!="fetch"){var _5=_3.selectString("//default:success");if(_5!="true"){_1.errors=this.convertValidationErrors(_3);this.logWarn("save failed, errors are: "+this.echo(_1.errors));_1.status=-1;return _1}if(_4!="remove"){var _6=isc.addProperties({},_2.oldValues,_2.data.sObjects[0]);if(_4=="add"){_6.Id=_1.data[0].id}_1.data=_6}else{var _7=_1.data[0].id;_1.data={Id:_7};this.logWarn("cache sync data on remove: "+this.echo(_1.data))}return _1}var _8=_3.selectString("//default:queryLocator");if(_8!=null&&!isc.isAn.emptyString(_8)){_1.queryLocator=_8}_1.totalRows=_3.selectNumber("//default:size");var _9=_1.data;for(var i=0;i<_9.length;i++){if(isc.isAn.Array(_9[i].Id))_9[i].Id=_9[i].Id[0]}return _1},isc.A.fetchData=function(_1,_2,_3,_4){var _5=this;if(this.autoLogin&&!_4){isc.SForce.ensureLoggedIn(function(){_5.fetchData(_1,_2,_3,true)});return}return this.Super("fetchData",arguments)},isc.A.convertValidationErrors=function(_1){var _2=_1.selectNodes("//default:errors"),_3={};for(var i=0;i<_2.length;i++){var _5=_2[i];_5=isc.xml.toJS(_5);_3[_5.fields]=_5.message}return _3});isc.B._maxIndex=isc.C+4}isc._moduleEnd=isc._SalesForce_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('SalesForce module init time: ' + (isc._moduleEnd-isc._moduleStart) + 'ms','loadTime');}else{if(window.isc && isc.Log && isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'SalesForce'.");}/*  SmartClient Ajax RIA system  Version 6.5/LGPL Development Only (2008-04-30)  Copyright 2000-2007 Isomorphic Software, Inc. All rights reserved.  "SmartClient" is a trademark of Isomorphic Software, Inc.  LICENSE NOTICE     INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE     SOFTWARE EVALUATION LICENSE AGREEMENT. If you have received this file     without an Isomorphic Software license file, please see:         http://www.isomorphic.com/licenses/isc_eval_license_050316.html     You are not required to accept this agreement, however, nothing else     grants you the right to copy or use this software. Unauthorized copying     and use of this software is a violation of international copyright law.  EVALUATION ONLY     This software is provided for limited evaluation purposes only. You must     acquire a deployment license from Isomorphic Software in order to use     the SmartClient system, or any portion thereof, in any non-evaluation     application, including internal or non-commercial applications.  PROPRIETARY & PROTECTED MATERIAL     This software contains proprietary materials that are protected by     contract and intellectual property law. YOU ARE EXPRESSLY PROHIBITED     FROM ATTEMPTING TO REVERSE ENGINEER THIS SOFTWARE OR MODIFY THIS     SOFTWARE FOR HUMAN READABILITY.  CONTACT ISOMORPHIC     For more information regarding license rights and restrictions, or to     report possible license violations, please contact Isomorphic Software     by email (licensing@isomorphic.com) or web (www.isomorphic.com).*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -