Skip to content

Commit

Permalink
attachFile sample code corrected, popup api description changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Naresh28Babu committed Jun 13, 2017
1 parent 1c56f7d commit ac6c452
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/ZSDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var ZSDKMessageManager = (function(ZSDKMessageManager) {
var promiseIDCtr = 100;
var PromiseQueue = {}; // Queue holding all the GetRequest promises

var AllowedOrigins = new RegExp("^https?:\/\/[a-zA-Z0-9-_]*.(csez.zohocorpin.com|zoho.com|localzoho.com|zohoplatform.com|localzohoplatform.com|zohosandbox.com|localzohosandbox.com)(:[0-9]{0,4})?$");
var AllowedOrigins = new RegExp("^https?:\/\/[a-zA-Z0-9-_]*.(sandbox.crm-oem.com|csez.zohocorpin.com|zoho.com|localzoho.com|zohoplatform.com|localzohoplatform.com|zohosandbox.com|localzohosandbox.com)(:[0-9]{0,4})?$");

var isAppRegistered = false;
var AuthParentWindow, AuthParentOrigin;
Expand Down
22 changes: 12 additions & 10 deletions lib/ZohoCrmHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1568,12 +1568,14 @@ var ZOHO=(function(){
* @param {object} config - Configuration Object
* @param {String} config.Entity - SysRefName of the module.
* @param {String} config.RecordID - RecordID to associate the notes.
* @param {String} config.File - File data
* @param {object} config.File - File Object
* @param {String} config.File.Name - File Name
* @param {object} config.File.Content - File Content
* @return {Promise} Resolved user Upload acknowledgement
* @memberof ZOHO.CRM.API
* @example
*
* ZOHO.CRM.API.attachFile({Entity:"Leads",RecordID:"1000000031092",File:blob,FileName:"myFile.txt"}).then(function(data){
* ZOHO.CRM.API.attachFile({Entity:"Leads",RecordID:"1000000031092",File:{Name:"myFile.txt",Content:blob}}).then(function(data){
* console.log(data);
* });
* //prints
Expand Down Expand Up @@ -1811,16 +1813,16 @@ var ZOHO=(function(){
}
},
/**
* @namespace ZOHO.CRM.UI.PopUp
* @namespace ZOHO.CRM.UI.Popup
*/
PopUp:{
Popup:{
/**
* @function close
* @description Close current Widget PopUp Screen
* @description Close Widget Popup
* @returns {Promise} resolved with true | false
* @memberof ZOHO.CRM.UI.PopUp
* @memberof ZOHO.CRM.UI.Popup
* @example
* ZOHO.CRM.UI.PopUp.close()
* ZOHO.CRM.UI.Popup.close()
* .then(function(data){
* console.log(data)
* })
Expand All @@ -1839,11 +1841,11 @@ var ZOHO=(function(){
},
/**
* @function closeReload
* @description Close current Widget PopUp Screen and reload the View
* @description Close Widget Popup and reload the View
* @returns {Promise} resolved with true | false
* @memberof ZOHO.CRM.UI.PopUp
* @memberof ZOHO.CRM.UI.Popup
* @example
* ZOHO.CRM.UI.PopUp.closeReload()
* ZOHO.CRM.UI.Popup.closeReload()
* .then(function(data){
* console.log(data)
* })
Expand Down
6 changes: 3 additions & 3 deletions test/html/Main.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@



<!--

<script type="text/javascript" src="/build/js/ZohoEmbededAppSDK.min.js"></script>
-->
<!--
<script type="text/javascript" src="/lib/ZSDK.js"></script>
<script type="text/javascript" src="/lib/ZohoCrmHelper.js"></script>

-->
<link rel="shortcut icon" type="/test/image/png" href="lib/jasmine/jasmine_favicon.png">
<link rel="stylesheet" href="/test/lib/jasmine/jasmine.css">

Expand Down

0 comments on commit ac6c452

Please sign in to comment.