
Hi all!
I'm having an issue executing this code on IE 11:
if({!contact != null}){
contactId = '{!contact.id}'; var accountName = '⌗' + accountFieldId + '_ileinner'; $(accountName).parent().dblclick(); lookupPick('null', accountFieldId + '_lkid', accountFieldId,'','{!account.id}','{!account.name}','null','');false);}
The error I get back from it is:
TypeError: Unable to get property 'target' of undefined or null referenceat getEventTarget (https://natinst--dev--c.cs15.visual.force.com/jslibrary/1424969980000/sfdc/main.js:20:72)
at ApexDetailPage.prototype.dblClickField (https://natinst--dev--c.cs15.visual.force.com/jslibrary/1424969980000/sfdc/main.js:1565:88)
I realized a couple of things here:
- IE 11, the function dblclick() fires a MSPointerEvent object instead of a MouseEvent (more info here: https://msdn.microsoft.com/en-us/library/ie/ms536921%28v=vs.85%29.aspx.)
- When dblclick is executed, it fires a function called dblclickField found at main.js a Salesforce javascript file.
I tried to execute
dblclickField function directly for testing but only got lots of errors back... by the way this isn't a good practice as the header of the main.jsfile says:
"This code is for Internal Salesforce use only, and subject to change without notice.
Customers shouldn't reference this file in any web pages."
How can I make it work ? is it a Salesforce bug ?
Thanks and regards!1 risposta