• James Buckelew
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 9
    Replies
I have a flow that is invoked by a button on the opportunity. It's an on screen flow that will display a dropdown with two options. One of those options, if chosen, will display an iframe (calendly) in an aura component that calls a visualforce page.
I have no issues access this and viewing the widget in an iframe, however other users cannot see it. It displays the sad face png.I've been searching on this for a few hours and have tried a few different things, and no luck. I will add code here.

.cmp
<aura:component implements="forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens" access="global">
    <aura:attribute name="firstName" type="String"/>
    <aura:attribute name="lastName" type="String"/>
    <aura:attribute name="decodedEmail" type="String"/>
    <aura:attribute name="recordId" type="String"/>
    <aura:attribute name="cDomain" type="String" default="https://nameddomain--c.visualforce.com"/>
    <iframe src="{!v.cDomain + '/apex/Calendly?recordId=' + v.recordId + '%3DfirstName=' + v.firstName + '%3DlastName=' + v.lastName + '%3Demail=' + v.decodedEmail}" width="100%" height="500px;" frameBorder="0"/>
</aura:component>


.design

<design:component>
    <design:attribute name="firstName" label="First Name"/>
    <design:attribute name="lastName" label="Last Name"/>
    <design:attribute name="decodedEmail" label="Email"/>
    <design:attribute name="recordId" label="Record Id"/>
</design:component>

VF Page
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
<!-- Calendly inline widget begin -->
<div class="calendly-inline-widget" style="min-width:320px;height:550px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<!-- Calendly inline widget end -->


<script>
        const calendlyHandle = "https://calendly.com/onboarding/?sfid={!$CurrentPage.parameters.recordId}&first_name={!$CurrentPage.parameters.firstName}&last_name={!$CurrentPage.parameters.lastName}&email={!$CurrentPage.parameters.email}";
        const calendlyContainer = document.getElementByClassName("calendly-invite-widget");
        calendlyContainer.setAttribute("data-url", calendlyHandle );
</script>
</apex:page>

I have unchecked both clickjack options. I have added as many pages as I can think to the trusted page source list. I can access this no problem, but other users cannot. If I login as other users, I can access the iframe. They have access to the VF page. ​​​​​​​

I am trying to allow our Salesforce Users to paste a number into an input field, then let an Apex Class process a named Credential HTTP request - currently getting an error and not sure why. 

I will post the code below. 

Alternatively, this number they are inputting also exists on the account object but I'm struggling to pass that information through to the Apex class as well. (Prefill the input box with the number, or submit the request onClick with a button)

-- Apex Class --

public class samCall {

    @AuraEnabled(cacheable=true)

    public static String samQuery(Integer accountDuns) {

        HttpRequest req = new HttpRequest();
        req.setEndpoint( 'callout:samAPI' + accountDuns );
        req.setMethod('GET');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        
        return res.getBody();

    }

}
-- HTML --
<template>
    <div >

        <lightning-input type="text" label="Enter DUNS" value={dunsNumber} onchange={handleChange}> </lightning-input>

        <p>Displaying SAM Information</p>

        <template if:true={samRecord}>
                <p> Name: {samRecord} </p>
        </template>

        <template if:true={error}>
            Some error occured.
        </template>
        
    </div>
</template>
-- JS --
import { LightningElement,wire,track,api } from 'lwc';

import getDuns from '@salesforce/apex/samCall.samQuery';
 

export default class searchSam extends LightningElement {

    @api dunsNumber;

    @track samRecord;

    @track error;

    handleChange(event){

        const userInput = event.target.value;

        this.dunsNumber = userInput;

    }

 

    @wire(getDuns,{ accountDuns: '$dunsNumber'}) 

    samData({ error, data }) {

        if (data) {

            //console.log('RecordId is'+recordId);

            this.samRecord = data;

            this.error = undefined;

        } else if (error) {

            //console.log('Error block');

            this.error = error;

            this.samRecord = undefined;

        }

    }

}

-- Meta --
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
            <target>lightning__RecordPage</target>
            <target>lightning__AppPage</target>
    </targets>
</LightningComponentBundle>


 

I have a partner company that I need to integrate with. They want me to set up my api connection for them so that they can get a notification when one field status on a custom object changes from active to deactive. 

I am struggling to find a way to make a custom scope that only sees one field. 

Any advice here would be great! Thank you!!

There are few things I'm looking to accomplish in lightning that require lightning components, but we never set up our domain. I'm attempting to test in sandbox, but running into an error with out email templates. 

Currently the things i'm aware of with hard coded URLS:
- Custom buttons/links related to email templates
       If there is a way to create new buttoms for email template links I'm all ears current part of our link in the custom email button/link ---- (instance).salesforce.com/_ui/core/email/author/EmailAuthor?rtype....template.ID=dddddddddddd
I tried updating this link to the new domain, but it didn't work. I got an error saying we weren't in compliance with salesforce email 

- Visualforce pages 
- A few APIs 
- one or two misc things

I would like to be able to build out some new components but I am worried that switching to my domain will break too many things for me to fix. Any guidance or suggestions would be greatly appreciated. Thank you for reading all this!!
I have a flow that is invoked by a button on the opportunity. It's an on screen flow that will display a dropdown with two options. One of those options, if chosen, will display an iframe (calendly) in an aura component that calls a visualforce page.
I have no issues access this and viewing the widget in an iframe, however other users cannot see it. It displays the sad face png.I've been searching on this for a few hours and have tried a few different things, and no luck. I will add code here.

.cmp
<aura:component implements="forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens" access="global">
    <aura:attribute name="firstName" type="String"/>
    <aura:attribute name="lastName" type="String"/>
    <aura:attribute name="decodedEmail" type="String"/>
    <aura:attribute name="recordId" type="String"/>
    <aura:attribute name="cDomain" type="String" default="https://nameddomain--c.visualforce.com"/>
    <iframe src="{!v.cDomain + '/apex/Calendly?recordId=' + v.recordId + '%3DfirstName=' + v.firstName + '%3DlastName=' + v.lastName + '%3Demail=' + v.decodedEmail}" width="100%" height="500px;" frameBorder="0"/>
</aura:component>


.design

<design:component>
    <design:attribute name="firstName" label="First Name"/>
    <design:attribute name="lastName" label="Last Name"/>
    <design:attribute name="decodedEmail" label="Email"/>
    <design:attribute name="recordId" label="Record Id"/>
</design:component>

VF Page
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0">
<!-- Calendly inline widget begin -->
<div class="calendly-inline-widget" style="min-width:320px;height:550px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<!-- Calendly inline widget end -->


<script>
        const calendlyHandle = "https://calendly.com/onboarding/?sfid={!$CurrentPage.parameters.recordId}&first_name={!$CurrentPage.parameters.firstName}&last_name={!$CurrentPage.parameters.lastName}&email={!$CurrentPage.parameters.email}";
        const calendlyContainer = document.getElementByClassName("calendly-invite-widget");
        calendlyContainer.setAttribute("data-url", calendlyHandle );
</script>
</apex:page>

I have unchecked both clickjack options. I have added as many pages as I can think to the trusted page source list. I can access this no problem, but other users cannot. If I login as other users, I can access the iframe. They have access to the VF page. ​​​​​​​

I am trying to allow our Salesforce Users to paste a number into an input field, then let an Apex Class process a named Credential HTTP request - currently getting an error and not sure why. 

I will post the code below. 

Alternatively, this number they are inputting also exists on the account object but I'm struggling to pass that information through to the Apex class as well. (Prefill the input box with the number, or submit the request onClick with a button)

-- Apex Class --

public class samCall {

    @AuraEnabled(cacheable=true)

    public static String samQuery(Integer accountDuns) {

        HttpRequest req = new HttpRequest();
        req.setEndpoint( 'callout:samAPI' + accountDuns );
        req.setMethod('GET');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        
        return res.getBody();

    }

}
-- HTML --
<template>
    <div >

        <lightning-input type="text" label="Enter DUNS" value={dunsNumber} onchange={handleChange}> </lightning-input>

        <p>Displaying SAM Information</p>

        <template if:true={samRecord}>
                <p> Name: {samRecord} </p>
        </template>

        <template if:true={error}>
            Some error occured.
        </template>
        
    </div>
</template>
-- JS --
import { LightningElement,wire,track,api } from 'lwc';

import getDuns from '@salesforce/apex/samCall.samQuery';
 

export default class searchSam extends LightningElement {

    @api dunsNumber;

    @track samRecord;

    @track error;

    handleChange(event){

        const userInput = event.target.value;

        this.dunsNumber = userInput;

    }

 

    @wire(getDuns,{ accountDuns: '$dunsNumber'}) 

    samData({ error, data }) {

        if (data) {

            //console.log('RecordId is'+recordId);

            this.samRecord = data;

            this.error = undefined;

        } else if (error) {

            //console.log('Error block');

            this.error = error;

            this.samRecord = undefined;

        }

    }

}

-- Meta --
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>51.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
            <target>lightning__RecordPage</target>
            <target>lightning__AppPage</target>
    </targets>
</LightningComponentBundle>


 

I have a partner company that I need to integrate with. They want me to set up my api connection for them so that they can get a notification when one field status on a custom object changes from active to deactive. 

I am struggling to find a way to make a custom scope that only sees one field. 

Any advice here would be great! Thank you!!

I have included Iframe in VF page but it is not displaying.
Thing i have done :
1) Allowed All cookies
2) Unchecked - 'Enable clickjack protection for customer Visualforce pages with standard headers'
3) Added the URL in 'Whitelisted Domain for VF'
Still, it is not working.
Could anyone provide any solution for this.
Code snippet -
<apex:page showHeader="false" standardStylesheets="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" controller="testIframeController">
        <apex:iframe src="https://www.salesforce.com" id="theFrame" height="500px" width="1000px"/>
 
</apex:page>


 
I added a button to my Opportunities that sends an email with a template and autofilled fields using javascript. However, this button does not appear in lightning since it doesn't support JS. Is there another alternative to replace this button, so I can have a visible button on both classic and lightning? 
I've been told that I can parse the subject line of a case using flow and process builder but I really have no idea where to start. Can someone give me an outline of the steps I would take? I've done some investigating in flow but the only thing I can see that may work would be to use a loop variable but I don't know if I'm even heading in the right direction. 

Here's what I'm hoping to accomplish: 
We have cases that all come in from the same email address. The email address is not associated with any of the contacts on the accounts however they have the correct account number in the subject line of the case. I need to assign the case to the correct account based on the account number in the case subject line. All of the account numbers are six characters long. 

Here's an example of what the subject line would look like: "123456 Backups complete on "