Skip to main content
Nintex Community Menu Bar
Question

Add Contact button- Can't get URL redirect to work

  • July 10, 2024
  • 4 replies
  • 16 views

Forum|alt.badge.img+4

I am trying to great a Global Action button that will redirect my users to the standard create new contact page in salesforce.  I can get the page to pull up fine, but I can’t get the AccountID to pass into the Account field.

Here is my redirect URL:
/setup/ui/recordtypeselect.jsp?ent=Contact&retURL=%2F{{{$Model.Contact.data.AccountId}}}&save_new_url=%2F003%2Fe%3FretURL%3D%252F{{{$Model.Contact.data.AccountId}}}%26accid%3D{{{$Model.Contact.data.AccountId}}}

Any idea what could be wrong?

This topic has been closed for replies.

4 replies

Forum|alt.badge.img+17

you need to indicate the row number. If you only have one record in the model (like a detail page), then it is row 0. Modify your merges like this: {{{$Model.Contact.data.0.AccountId}}}


Forum|alt.badge.img+4

Thanks Raymond.  That works except in the case where my contact model is empty (i.e. there aren’t any contacts already associated with the account).  Any ideas for that?  


Forum|alt.badge.img+17

If you aren’t populating that parameter anyway, you should be able to just drop it out of the URL.


Forum|alt.badge.img+4

I figured it out.  Had to run this as a run multiple actions button and re-query the model before my redirect.