Hot answers tagged

2

You can add a listener with JS to the iFrame ex. var iframe = document.getElementById('myIFrame'); iframe.contentDocument.body.addEventListener('mouseup', Handler); function Handler() { alert(new Date()); }


2

Lightning doesn't support <svg> and <use> tags. There is already an answer for this question Trying to utilize “use” tag lightning component, what is the workaround? So in your example you can utilize standard Lightning tag 'lightning:icon': <lightning:icon iconName="utility:search" alternativeText="Search" title="...


2

I tested it in my DevOrg, seems like case -sensitive might be the issue. Change name to Name ,firstname to FirstName...... Try it /lightning/o/Lead/new?recordTypeId=0121N0000012oypQAA& defaultFieldValues=Name={!Lead.Name},FirstName={!Lead.FirstName},LastName={!Lead.LastName},OwnerId={!Lead.OwnerId}


2

For this i would suggest the new lwc headless action where you can have apex controller to query for the id of the Office record based on the Name from the user record. Then fire from the invoke method navigation to a new record page with a predefined Office field on Opportunity. Posting the code for the navigation as it could be hard to find. { type: '...


2

In lwc documentation you can find this statement about css hooks. Use SLDS styling hooks to customize the component's styles. For example, specify the background color on the button with brand variant using the --sds-c-button-brand-color-background custom property. Sample snippet: .myClass { --sds-c-button-brand-color-background-disabled: purple; } In ...


2

If you're using a Quick Action, you can use Dynamic Actions to conditionally render the button. If you're using a normal button, you can't disable the button, but you could have your Apex code not perform the update and/or show an error in Visualforce if the feature cannot be used.


1

From the screenshot you have provided, it seems that you are using the Side Panel that is available either in Outlook or Gmail. The reason why the New Contact button is not showing there is perhaps you have multiple Record Types available for the Contact Object. To move forward, you can visit your New Contact from Global Actions (in Setup) and make sure the ...


1

For a more declarative solution, a screen flow should work although it probably ends with a redirect within a custom component. Create a new URL List Button based on the URL of the flow Within the flow you can do the following: Get user information based on current user Id Get relevant Office record Id based on user picklist field Present a screen to "...


1

Use CSS media queries, or LWC form factor and template if:true to render either the button group or the button menu based on that. Updated: To listen for manual changes: You can use a listener on the resize event like: In the controller: <div style={height}> <div> In the controller: _height = window.innerHeight; get height() { return `${...


1

You cannot remove Role, Role and Internal subordinates options, as these are standard salesforce button functionality with Manual sharing. Check custom button manual sharing examples here 1 , 2 and see if that helps you. Thanks


1

Just use icon-name to specify an icon: <lightning-button icon-name="utility:sync" ...> </lightning-button> See this demo.


1

On the assumption that this button is just a small part of a larger component where all profiles see the other parts you have not shown, you need to make the button rendering conditional: <template if:true={canDeactivate}> <lightning-button slot="actions" label="Deactivate" onclick={DeactivateProcess}> </lightning-...


1

Not sure if this is correct, but I was also wondering recently the same thing about that standard button. In Spring '21 sandbox preview orgs, it's been renamed 'Get Alerts'. The API Name is 'IsotopeSubscriptions'. Isotope seems to be related to Salesforce Engage and Quip in some documentation, but also a part of Salesforce Anywhere with these being added ...


1

Well, I forgot to mention in my question that I had already tried the naieve solution, such as setting the height of the button, but those setting were ignored. After literally more than a day of googling and investigation, this is what worked for me. Adding the following to the definition of the button: cellAttributes: { class: 'slds-p-vertical_none slds-m-...


1

Using track variable is another way to go. In the javascript controller @track iconname = 'DefaultIconName'; handleToggleIconname(){ this.iconname = 'NewIconName'; } In the html template file <lightning-icon icon-name={iconname}></lightning-icon>


Only top voted, non community-wiki answers of a minimum length are eligible