create new contact using GlobalAction popup from account page

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I am trying to use a global action popup to add a new contact to an account from my account detail page. I would like the new contact popup to pre-populate with the billing address from the account (section b) and Name and other details to be empty so I can enter them. 

Is this possible? I could not find a video or tutorial for this. 
Thx 
Andy
Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
Yup. A couple easy options.

  1. Set a Condition on the contact model for AccountID to be the Id value of the Account Model.
  2. Sel Create New Row Action from your action framework. You then have another button that renders to add default values.


Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb
Pat,
Are you suggestion the green '+' to add a row and then a row action to pop up an edit window?
not really following you after the filter on the contact model.

Andy
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
I gave you two options on how to achieve the same result. By condition on the contact or by setting the default value on the create row action using {{$Model...
Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb
I think I am getting it.... I am watching a video from Zach on action framework.
Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb
I have it so the pop up opens and pre-populates what I need. When I click Save in the pop-up it does not close, but appears to show a new empty pop-up window.

Did I miss something that will close the window on save?


Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
The popup needs to have custom actions. The Save/Cancel in a field editor doesn't have the ability to do any action framework stuff. Disable those buttons.

Add a page title component to the popup. On the page title component you can add some buttons. In there you can set all the appropriate actions.
  1. Show Message and block UI
  2. Save Model
  3. Close Popup
  4. Unblock UI
(Edited)
Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb
Was just getting to this.
Thanks for all your help!!!!!
Photo of Andy Chasin

Andy Chasin

  • 382 Points 250 badge 2x thumb
Pat,
Thanks to your help, I was able to finish what I needed to do today.

I owe you a beer!
Andy
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,774 Points 20k badge 2x thumb
Strongbow Cider please. :D