• JasonG
  • NEWBIE
  • 10 Points
  • Member since 2018
  • Junior Salesforce Developer
  • Dealerteam


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 2
    Replies
How do I insert the host name into the url?
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="host" type="String" />    
    <lightning:button label="Print" onclick="{!c.printModalToggle}" />   
    {! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId}                                      
<iframe src="{! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId}" width="100%" height="300px;" frameBorder="0"/>       
</aura:component>
And the controller 
({
	doInit: function(component, event, helper) {
		component.set('v.host', window.location.hostname);
	}
})
The {! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId} correct value but when it is entered into the iframe src attribute nothing happens. If I manually. enter that url into the address bar the page opens. Is there something with the <iframe src attribute that would give me trouble here?
  • February 28, 2018
  • Like
  • 0
I am trying to re-create a visualforce page in lightning that shows referenced objects when typing.
<apex:inputField value="{!Service__c.Company__c}" label="Service Company"/>
 This code shows a drop down of suggested companies from the service object.

Is there a lightning component that does the same thing as the vf code?
Does it have to do with the controller?
Do I need to add an aura:attributte?
  • February 26, 2018
  • Like
  • 0
Why is the label attribute required on the lightning:input? Is there a way to just use the placeholder instead of a label? What if I want the label to be the size of  of a header? Just curious why this label is required when It can really affect design?
  • February 09, 2018
  • Like
  • 0
I am trying to get the value of the aura:attribute in the js controller.
<aura:component>
  
  <aura:attribute name="falseValue" type="boolean" default="false" />
  
  <ui:button label="Log Value"  press="{!c.logValue}"/>

<aura:component>
js function
({    
  logValue : function(component, event, helper) {
        console.log(v.falseValue);
    }
})
What would I do to get the value false returned from the aura attribute.

 
  • February 07, 2018
  • Like
  • 0
 Why add a bunch of slds classes for a few features instead of make a custom class with the features I want.  Is there a reason for adding
<div class="slds-box slds-p-around_small slds-m-around_small">
  <!-- Stuff in Container -->
</div>
to a container div instead of making a custom class
<div class="container">
   <!-- Stuff in Container -->
</div>
and adding the css features I specifically want?  I made two similary looking forms one with slds only and one with custom classes and it seems easier to see what is going on to inspect one class and check the css styles instead of inspecting multiple slds classes to find the slds styles. What is best practice?
  • January 31, 2018
  • Like
  • 0
I removed a workflow action then wanted to recreate it. It will not let me  thought and throws an error that says the Unique Name already exists. What happens when I click remove? Can I bring it back? Can I delete the Unique name completely and recreate it? New so might need beginner instructions.Thank you.User-added image 
 
  • January 03, 2018
  • Like
  • 0
How do I insert the host name into the url?
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="global">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:attribute name="host" type="String" />    
    <lightning:button label="Print" onclick="{!c.printModalToggle}" />   
    {! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId}                                      
<iframe src="{! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId}" width="100%" height="300px;" frameBorder="0"/>       
</aura:component>
And the controller 
({
	doInit: function(component, event, helper) {
		component.set('v.host', window.location.hostname);
	}
})
The {! v.host + '/apex/VISUALFORCEPAGE?Id=' + v.recordId} correct value but when it is entered into the iframe src attribute nothing happens. If I manually. enter that url into the address bar the page opens. Is there something with the <iframe src attribute that would give me trouble here?
  • February 28, 2018
  • Like
  • 0