I have a managed package object which has a button called Public Link which executes Javascript and displays a public URL in an iframe.
Is it possible to see the javascript function code and save the value in the iframe to record?
edit: This is the code in the script section of the button
window.invokeOnClickJS_00bR0000000EbrP = function(element) {
function getRecordIds(keyPrefix) { return
Scontrol.prototype.getSelectedRecordIdsFromForm(element.form, keyPrefix); }
element.invokeAction = function() {
var scriptLibrary = [];
Util.loadScripts(scriptLibrary, 0, function() {
try {
Sfdc.logServer('JAVASCRIPT_BUTTON', {id: '00bR0000000EbrP', name: 'lmscons__Public_Link'}, Sfdc.Logging.LogLevel.INFO);
Util.stripCustomFunctionFromObjectPrototype(Array);eval('openPublicLink();') } catch (e) { alert('A problem with the OnClick JavaScript for this button or link was encountered:\n\n' + (e.message ? e.message : e)) }
finally { Util.restoreCustomFunctionsToObjectPrototype(Array);}
});
};
element.invokeAction();
}
openPublicLink=function(){A4J.AJAX.Submit('j_id0:j_id11',null,{'similarityGroupingId':'j_id0:j_id11:j_id28','oncomplete':function(request,event,data){completeGetPublicLink()},'parameters':{'j_id0:j_id11:j_id28':'j_id0:j_id11:j_id28'} ,'status':'j_id0:loadStatus'} )};
function completeGetPublicLink() {
jQuery('#publikUrl').show();
jQuery('#uploadForm').hide();
jQuery('#TitleUp').text('Public Link');
var PublicLink = jQuery('[id$="CFS_pLink"]').val();
//jQuery('#publikUrl').text(jQuery('[id$="pLink"]').val());
jQuery('#publikUrl').empty();
jQuery('#publikUrl').append('<textarea cols="105" rows="4" readonly="true">'+PublicLink+'</textarea>');
Lightbox();
//alert(jQuery('[id$="pLink"]').val());
}