• chetan jangid
  • NEWBIE
  • -1 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I have a lightning component which is going to be used for a Quick Action on a record page. I have implemented force:QuickActionWithoutHeader because I need to have custom "save" and "cancel" buttons. However, the modal that pops up for the quick action has a lot of excess white space, which makes the header and footer look out of place. How can I fix this?

Current Output:
User-added image


Desired Output:
(Actually I would even like the modal pop-up to be smaller so that the input fields do not have so much excess white space, but if I can get the header and footer to look right I will settle for that)
User-added image


Component Code:
<aura:component implements="force:lightningQuickActionWithoutHeader,flexipage:availableForRecordHome,force:hasRecordId" access="global" controller="FileUploadController">

    <div class="modal-header slds-modal__header slds-size_1-of-1">
        <h4 class="title slds-text-heading--medium" >Upload File</h4>
    </div>
        
        <!-- MODAL BODY / INPUT FORM -->    
    <div class="slds-modal__content slds-p-around--x-small slds-align_absolute-center slds-size_1-of-1 slds-is-relative" aura:id="modalbody" id="modalbody">
        <form class="slds-form--stacked">
            <!-- All the fields for the form input -->
       </form> 
  
    </div>   <!-- End of Modal Content -->  
        
        <!-- MODAL FOOTER -->
		<div class="modal-footer slds-modal__footer slds-size_1-of-1">
            <div class="forceChangeRecordTypeFooter">
                <ui:button class="slds-button slds-button_neutral" label="Cancel" press="{! c.cancel}" /> 
                <ui:button class="slds-button slds-button--brand"
                       label="Save" press="{!c.save}"/>
            </div>
        </div>
</aura:component>

 

 
Hi all,

We need to implement the following pattern at my org:
  • callout to external data source
  • if that callout takes too long (according to some configurable threshold), log an error (ie do some DML)
  • if that callout timed out on the remote server, try it again
Recognizing the potential for the dreaded "You have uncommitted work pending. Please commit or rollback before calling out." error, I put the error logging code in a future method, thus isolating the DML from the callouts. However, the error is still being thrown. I reduced the issue down to this pattern:
public static void foo() {
    Http http = new Http();
    HttpRequest req = new Httprequest();
    req.setEndpoint('https://test.salesforce.com'); //whatever endpoint
    req.setMethod('GET');
    http.send(req); //works fine
    bar();
    http.send(req); //throws calloutexception
}

@future public static void bar() {

}
Am I correct to assume that calling a future method counts as a DML operation? Is there any documentation I'm missing somewhere?