1

I'm trying to use a Lightning Component in a Quick Action (introduced in Winter '17), but the documentation has no mention of placing a Save button alongside the Cancel button in the modal dialog footer.

The docs mention how to completely hide the Quick Header but hiding the header, also hides the New [Record] heading text.

And if we were to add our own header, there is a pre-defined padding introduced in the component tat makes the custom heading look so much out of shape.

Please see this screenshot: enter image description here

Note the heading bottom border only spans to the component, because the full component is being placed inside a div with fixed padding, asnd thus the left-right border bottom seems cut-off.

Ideally, if I could place the Save and Cancel button on quick header I would love to get the save button to save my record just like how publisher SDK do in VF Quick Action and then I won't be required to Hide the Quick Header i my component.

Can anyone suggest how I can have the Save button shown and be used to save the record from quick header?

0

Unfortunately currently there is no perfect solution. One other problem is that if you use your action in Salesforce1, the buttons are not at the same place (bottom in LEX, top in SF1).

I guess keeping the header but having the SAVE button inside the component is maybe the better, even if I find it confusing for users and not consistent with standard actions.

If you have access to the Partner Community, I've started a thread about it here.

-1

I've solved this by ignoring the quick action altogether for now. If you're able to place the button launching the modal elsewhere on your page, you can use my MessageService component from my framework below.

It can throw modals and take in (somewhat) flexible actions for the main button (save, in your example). Feel free to check it out:

https://github.com/tsalb/sfdc-lightning-service-components

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.