I am trying to access the input elements in the dialog box from a jquery script places in the main page(background), but I am unable to do so. This dialog box pops up when I doubleclick on the Billing address field in the main page.
PLease let me know on how to access the form elements in the dialogbox from the main page?
Edited:
Actually when the contact page detail page is loaded, you wouldn’t find a field with the id con19country, but only after you double click the mail address this field becomes available in the DOM. Also the div(id=InlineEditDialog) that holds the fields that becomes visible when double clicked on mailing address is also grayed out in the HTML. Check the image here : https://i.stack.imgur.com/7cdd4.jpg
Edited again:
I was able to access the dialog box finally..
j$("[id*=_ilecell]").bind('dblclick', function(){
var elementID = j$(this).attr('id');
if (!sfdcPage.editMode)
sfdcPage.activateInlineEditMode();
if (!sfdcPage.inlineEditData.isCurrentField(sfdcPage.getFieldById(elementID)))
sfdcPage.inlineEditData.openField(sfdcPage.getFieldById(elementID));
stateCountryAutocomplete();
});
});
You can also refer this blog for further help: http://blog.force365.com/2012/07/30/ui-tips-and-tricks-country-list/
Regards
Sam
You can easily use Firebug (or any other developer tools) in the browser of your choice to learn these.
In this example BillingStreet can be obtained by
$('#acc17street').html()But fear not, there are compiled lists of known standard field Ids. Scroll a bit for example here: http://phollaio.tumblr.com/post/22058016777/how-to-obtain-a-field-id and consider leaving a nice comment for this guy so it doesn’t look like I stole his hard work in this question giving nothing in return 😉
EDIT 🙂 What exacly are you after? Do you want to capture the content of this box? Or address details in general? Or do something after OK is clicked? I think you’d have to inspect functions visible when you hover over the address field.
Try to find definition of this sfdcPage and if you can override some of the functions with “whatever they were doing originally + your behavior”? It’s an object constructed from prototype called
DetailPageand you can find the definition in/jslibrary/(some timestamp)/sfdc/main.js