I have a VF page that uses with inline editing enabled. I am using jQuery to hide the row containing the Billing Address and Shipping Address fields, and am adding my own address fields after it. I want to copy the values in my fields to the corresponding fields in the inline edit dialog.

The problem is, the SalesForce address fields (Billing Street, Billing City, etc) don't exist in the DOM until the Billing Address and Shipping Address fields are double-clicked for the first time. The user will never double click them on my page because I hid them and replaced them with my own.

How can I programmatically generate those fields, or make it think the address field has been double-clicked?

  • 2
    Hey Neo! Can you post your VF page? May 20 '15 at 22:08

I ended up getting this to work by using

    sfdcPage.dblClickField(event, sfdcPage.getFieldById('acc17j_id0_j_id1_ilecell'));

So I'm actually triggering the double-click event, then closing the dialog before it gets a chance to display on the screen.

I'll want to get that id dynamically rather than hard-code it since it is generated dynamically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.