This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Veeva API helper library | |
| // dependencies: async | |
| // Brian Pfeil - 2012-03-01 - init | |
| (function() { | |
| window.veeva = { | |
| getRandomFunctionName: function() { | |
| var randomNumber = Math.floor(Math.random() * (new Date()).getTime()); | |
| var millisecondsSinceEpoch = (new Date().getTime()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hostReachable() { | |
| // Handle IE and more capable browsers | |
| var xhr = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" ); | |
| var status; | |
| // Open new request as a HEAD to the root hostname with a random param to bust the cache | |
| xhr.open( "HEAD", "//" + window.location.hostname + "/?rand=" + Math.floor((1 + Math.random()) * 0x10000), false ); | |
| // Issue request and handle response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //First thing: get the product SFID | |
| function prod_callback(result) { | |
| prod_id_array.push(result); | |
| } | |
| com.veeva.clm.getDataForCurrentObject("KeyMessage", "Product_vod__c", prod_callback); | |
| function track(arr) { |