Skip to main content

I'm not a developer and I'm looking for an easy solution to this problem:

 

We implemented an aura component just to launch a screen flow from "Global Actions." Works great, except that the window the Flow appears in once it's "Maximized" out of the corner and into the center of the screen,  is not wide enough to comfortably display the lookup values the user is supposed to select from. so I just want to widen that window.

 

Increasing the height of the Global Action doesn't help.

 

Increasing the numbers in the .svg file doesn't seem to help. (I tried increasing the 120s to 500, but didn't see a change: <svg width="120px" height="120px" viewBox="0 0 120 120"

 

I tried using some tweaked code from the article linked below, but it gives me errors and I don't know how to fix them. (Article talks about Quick Action, not Global Action)

 

Code I'm trying in the Renderer:

({

    import { LightningElement } from 'lwc';

    export default class NewFoodTripGlobalAction extends LightningElement {

         modalContainer;

         isLoaded = false;    renderedCallback() {

    if(this.isLoaded) return;

    const STYLE = document.createElement("style");

    STYLE.innerText = `.uiModal--medium .modal-container{

            width: 100% !important;

            max-width: 100%;

            min-width: 480px;

            max-height: 100%;

            min-height: 480px;

    }`;

    this.template.querySelector('lightning-card').appendChild(STYLE);

    this.isLoaded = true;

}

})

 

Error is: org.auraframework.util.json.JsonStreamReader$JsonStreamParseException: Expected ':' [2, 31]: Source

 

Note that there are 4 open curly braces and only 3 close ones - but not sure where to put another close one. I tried them in a few places, but it didn't help. I also tried adding a !important and removing it (based on someone's suggestion), but that didn't seem to change anything, either. There are no "Problems" indicated in that tab in the Dev Console.

 

Article:

https://medium.com/@gaurav.rawat194/lwc-how-to-increase-the-size-of-screen-action-modal-pop-up-in-salesforce-crm-2b6b2db34d82#id_token=eyJhbGciOiJSUzI1NiIsImtpZCI6ImUyNmQ5MTdiMWZlOGRlMTMzODJhYTdjYzlhMWQ2ZTkzMjYyZjMzZTIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiIyMTYyOTYwMzU4MzQtazFrNnFlMDYwczJ0cDJhMmphbTRsamRjbXMwMHN0dGcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIyMTYyOTYwMzU4MzQtazFrNnFlMDYwczJ0cDJhMmphbTRsamRjbXMwMHN0dGcuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTM0MDQxNDQ5MjI1NDAxNDg1MjAiLCJlbWFpbCI6ImRvZGlmcmllZGVuYmVyZ0BnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmJmIjoxNzIyNjE1OTA3LCJuYW1lIjoiRG9kaSBGcmllZGVuYmVyZyIsInBpY3R1cmUiOiJodHRwczovL2xoMy5nb29nbGV1c2VyY29udGVudC5jb20vYS9BQ2c4b2NMSkFoeGk1LWVXUmlzRG9zWl9PbFNvVVlEOXU2Qm1nQ1BpQjV6SEtuY3dUUFNoWk8wPXM5Ni1jIiwiZ2l2ZW5fbmFtZSI6IkRvZGkiLCJmYW1pbHlfbmFtZSI6IkZyaWVkZW5iZXJnIiwiaWF0IjoxNzIyNjE2MjA3LCJleHAiOjE3MjI2MTk4MDcsImp0aSI6IjlkZmNmMGMzZjZiNzFlYjMxOGFjOWM4YWE3ZDM0ODZiMjNmZDg1NWMifQ.EM1XY06qkM8tH9pSz2-tKFtWO2G4Cz_0hzx1f8Ok2d_k8QpgT0n7dGLbQqB_nsKHkmTA6B5gv8EvKq0ebUUXoIo9LhMXoc3p6lW9spxVu8uqL4yLrB4IDczHSU2ZMa2ixA-dzQ0S-CgjW_2NUAoKK0Nur6_bqboXUrI3tpmrFOg1Jka4KbIr4dz39Znt2s1AW_PgqufjR6jFiaFb7tVEz_TFGr__AojWYXnTqOgsj7CLuvoo1c1Zp8ieZ0odP1ZjI-uh6Ny2XZeZnGKVlfXP6I-74HWn9K0b8pfVhq8fQYw7WYpVNRTez3GczIK1ipo5IR_HawiwEcqAgTCPSBpx7g)

 

Is there a different component I could use or does someone know how I can get this one to display in a wider window?

 

Thanks in advance for any suggestions.

8 respostas
  1. 14 de fev. de 2025, 21:35

    @Naseema Shaik: A developer (who shall remain nameless, unless they want to chime in here and take credit) helped me with this. The solution was not specific to the modal I wanted to widen - it widened all such modals, which was fine in our case. I can't vouch for this or help support it, but in case it helps anyone else get further along, I'll share it here: 

     

    Upload a new "Static Resource" (from a file): 

    Setup->Static Resource->New->Create "Modal_Override_90" 

     

    Upload a file containing: 

    .slds-modal__container { 

    width: 90% !important; 

    max-width: unset !important; 

     

    (I think you could try a smaller number than 90%. But I didn't have any success trying to edit it once it was uploaded.) 

     

    Aura Component (.cmp): 

    <aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader" access="global"> 

    <ltng:require styles="{!$Resource.Modal_Override_90}"/> 

         

        <aura:handler name="init" value="{!this}" action="{!c.init}"/> 

        <lightning:flow aura:id="flowData"/> 

    </aura:component> 

     

    Would love to know if this helps anyone!

0/9000