I'm trying to use the sforce.one.createRecord event to create a record for Contact object with some pre-fill using the defaultFieldValues attribute. I don't want to use any custom built form because sforce.one.createRecord uses and handles fields directly from object page layout.

Now, I've to perform some operations only when the record gets successfully created, so I need the newly created recordId as well.

There are 2 problems here:

I) I need to prevent it redirecting to the new record page. I searched but couldn't find anything other than workarounds or hacks which are not consistent and reliable.

II) I need some callback/listener in my visualforce page that will check for successful creation and use the new recordId for additional operations.

My code is this:

    null,    //recordTypeId parameter
        LastName : "any lastname"

Also, is this idea already posted and in release pipeline?

Your Answer

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

Browse other questions tagged or ask your own question.