• Balasubramaniam 07
  • NEWBIE
  • 160 Points
  • Member since 2016


  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 20
    Replies
Hello,

I have read material that says I can add an app to the navigation bar in Lightning, I have read an Ideas Exchange post that says it was added in Spring 16.  However I created an app and it is not listed in the available items to add to the navigation bar and searching for it does not result in finding it.

Anyone know how to do this or if it is possible?

Thanks.
Hi team,

I need a help, I'm using Lightning in my VF to look a like, this VF need generated as PDF after user click in button, but the styles using Lightning was lost, how to solve this?

another problem is, I user apex:chart to show bars with some numbers, but how i used Lightning in my VF, the bars not show me, it is crazy hahaha...how to solve this issue too?

Thanks team.
<aura:application >
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system-ltng.css" />
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system-scoped.css" />
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system.css" />
    <ltng:require scripts="/resource/jquery214"  afterScriptsLoaded="{!c.afterScriptsLoaded}"/>
    
    <div class="slds-tabs--scoped">
  <ul class="slds-tabs--scoped__nav" role="tablist">
    <li class="slds-tabs--scoped__item slds-text-heading--label slds-active" title="ALL Accounts" role="presentation"><a class="slds-tabs--scoped__link" href="javascript:void(0);" role="tab" tabindex="0" aria-selected="true" aria-controls="tab-scoped-1" id="tab-scoped-1__item" onclick="selectTab(this);">All Accounts</a></li>
    <li class="slds-tabs--scoped__item slds-text-heading--label" title="ALL Contacts"
      role="presentation"><a class="slds-tabs--scoped__link" role="tab" tabindex="-1" aria-selected="false" aria-controls="tab-scoped-2" id="tab-scoped-2__item" onclick="{!c.selectTab}" data="{tab-scoped-3__item}">All Contacts</a></li>
    <li class="slds-tabs--scoped__item slds-text-heading--label" title="Item Three"
      role="presentation"><a class="slds-tabs--scoped__link" href="javascript:void(0);" role="tab" tabindex="-1" aria-selected="false" aria-controls="tab-scoped-3" id="tab-scoped-3__item" onclick="{!c.selectTab}" data="{tab-scoped-3__item}">Item Three</a></li>
  </ul>
        <div id="tab-scoped-1" class="slds-tabs--scoped__content slds-show" role="tabpanel" aria-labelledby="tab-scoped-1__item">
            ALL CONTACTS<c:ContactList />
        </div>
        <div id="tab-scoped-2" class="slds-tabs--scoped__content slds-hide" role="tabpanel" aria-labelledby="tab-scoped-2__item">
            ALL ACCOUNTS<c:AccountsList />
        </div>
        <div id="tab-scoped-3" class="slds-tabs--scoped__content slds-hide" role="tabpanel" aria-labelledby="tab-scoped-3__item">
            Item Three Content
        </div>
    </div>
</aura:application>

what i have to write for enabling Tab ? Please share javascript if possible.
  • July 07, 2016
  • Like
  • 0
Hi,

I have passed a single value to my server side apex controller using the following code

action.setParams({ "searchKey" : elemVal });

Now i want to pass one more argument along with elemVal. I tried the following code but i am getting null.

action.setParams({ "searchKey" : elemVal },{"temp" : t}):

Please help
  • June 24, 2016
  • Like
  • 0

How to show success message after record successfully saved to server.

 

<!---Component--->
<div class="slds-p-around--large">
        <aura:iteration items="{!v.CommunicatoActivity}" var="Act" indexVar="i">
            <div class="slds-page-header" aura:id="{!i+'activity'}" style="cursor: pointer;" onclick="{!c.sectionOne}">
                <section class="slds-clearfix" >
                    <div class="slds-float--left ">
                        <lightning:icon class="slds-show" aura:id="articleOne" iconName="utility:chevronright" size="xx-small" alternativeText="Indicates add"/>&nbsp;&nbsp;
                        <lightning:icon class="slds-hide" aura:id="articleOne" iconName="utility:chevrondown" size="xx-small" alternativeText="Indicates dash"/>&nbsp;&nbsp;
                    </div>
                    
                    <div class='msgContainer'>
                        <aura:if isTrue="{!v.CommunicatoActivity.Type__c == 'Incoming'}">
                            <div class="iconContainer"><img src="{!$Resource.incomingSMS}" height="20" width="20" /></div>
                            <aura:set attribute="else">
                                <div class="iconContainer"> <img src="{!$Resource.outgoingSMS}" height="20" width="20"  /></div>
                            </aura:set>
                        </aura:if>&nbsp;&nbsp;
                        <div class="numberContainer" ><a>{!Act.Phone_Number__c}</a></div>
                        <div style="margin-left: 15%;">
                            <p>You Sent a Message</p>
                        </div>
                    </div>
                </section>
            </div>
            <div class="slds-hide slds-p-around--medium" aura:id="articleOne">
                <p><strong>Type:</strong>{!Act.Type__c}</p>
                <p><strong>Phone:</strong>{!Act.Phone_Number__c}</p>
                <p><strong>Message:</strong>{!Act.Message__c}</p>
            </div>
        </aura:iteration>
    </div>

<!------------Js----------->
doInit : function(component, event, helper) {
        var action = component.get('c.getCommunicatoActivity');
        action.setParams({ "recordId" : component.get("v.recordId") });
        action.setCallback(this, function(response){
            var state = response.getState();
            if(state ==='SUCCESS'){
                component.set('v.CommunicatoActivity',response.getReturnValue());
            }else{
                console.log('Some Error');
            }
        });
        $A.enqueueAction(action);
        
    },
    
    sectionOne : function(component, event, helper) {
       helper.helperFun(component,event,'articleOne');
    },

<!-------Helper.Js---------------------->
helperFun : function(component,event,secId) {
      var acc = component.find(secId);
            for(var cmp in acc) {
            $A.util.toggleClass(acc[cmp], 'slds-show');  
            $A.util.toggleClass(acc[cmp], 'slds-hide');  
       }
    }

This is my code for expandable section in lightning component i get using aura:iteration
My problem is when i click on single section all section is exapanded 
Hi,
I have a Lightning Component on the Opportunity detail page that display button when press it opens a VF page.
The VF page is a form to complete to create a record on a custom object Fact_Finder__c which has a master-detail relationship with Opportunity.
I need to pre-populate the Opportunity Name on the VF page from the Opportunity recordId on the Lightning Component and when the Submit button is selected I need to go back to the Opportunity detail page.
I have looked intensively on forums and documentation but could not figure it how to do it.

My current working codes are as following. I have simplified it and did not put much style. The original code display many buttons on the Lightning component and my VF page (form) has a lot of input fields.
My component which capture the Opportunity recordId:
<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId" access="global">    
   <aura:attribute name="FFform" type="String" default="Fact Finder Form" access="global" />	
   <aura:attribute name="recordId" type="Id" />  
    
<div class="FFbuttons"> 
    <div aria-labelledby="FFformB">            
         <fieldset class="slds-box slds-theme--default slds-container--fluid">       
          <legend id="FFform" class="slds-text-heading--small">Fact Finder Forms</legend> 
             
     Opportunity id {!v.recordId}
             
             <form class="slds-form--inline">    
            <div class="slds-form-element">
          <ui:button label="Residential Landlord" 
                          press="{!c.openResidentialform}" />
 </div>    
</form>         
  </fieldset>        
  </div>
 </div>
</aura:component>
Client side Controller:
({
	openResidentialform: function(component, event, helper) {
	var urlEvent = $A.get("e.force:navigateToURL");   
    urlEvent.setParams({
      "url": "/apex/ResidentialForm"
    });
    urlEvent.fire();	
	},
VF page:
apex:page standardcontroller="Fact_Finder__c" extensions="ResidentialFormCtrExt" showHeader="false" sidebar="false" >
 
<style type="text/css">
 .buttonsubmit {
  width: 200px;
  font-size: 150% !important;
  background:#E9EEF2 !important;
  }
.buttoncancel {
  width: 200px;
  font-size: 120% !important;
  background:#E9EEF2 !important;
  } 
</style> 
 <apex:form style="width:800px; text-align:center; margin:auto;" enctype="multipart/form-data" > 
  <apex:pageMessages />
   <apex:pageBlock title="Residential / Landlords Fact Finder" >        
     <apex:pageBlockButtons location="bottom" > 
             <apex:commandButton action="{!saveFF}" value="Submit"  styleClass="buttonsubmit" /> 
             <apex:commandButton action="{!cancel}" value="Cancel" styleClass="buttoncancel" />
                </apex:pageBlockButtons> 

 <apex:outputPanel layout="block">
              <apex:pageblocksection columns="1">
                    <apex:inputfield value="{!FF.Opportunity_Name__c}"/>            
                    <apex:outputfield value="{!FF.Client_Name__c}"/>
                    <apex:inputfield value="{!FF.Date__c}"/>
     </apex:pageblocksection>  
</apex:outputPanel>   
 </apex:pageBlock>
  </apex:form>         
</apex:page>
Controller Server Side:
public with sharing class ResidentialFormCtrExt
{   
 @AuraEnabled

 public Fact_Finder__c FF {get; set;}   
Public ResidentialFormCtrExt(ApexPages.StandardController controller)
  {              
       this.FF=(Fact_Finder__c)controller.getRecord();
      
       //FF.Opportunity_Name__c= oppName;  

public PageReference cancel(){
   
    return null;
    //new PageReference('/' + oppName);  

    }

  public PageReference saveFF() {
                  
    insert (this.FF);
    
    return null;
    //new PageReference('/' + oppName);
      }      
  }

The oppName is what I need to capture (based on the Opportunity recordId) to pre-populate my form.
Any idea?
Thank you in advance for your help.
Sylvie

 
Hi,
I have a Lightning Component with a button and I need:
  • to display the text in 2 lines
My current code is :
.THIS .button { 
 width: 150px; 
 color: #00396B;   
 border: 2px solid #005FB2;  
   }
  • the button open a VF page and I would like that it opens it in a new window
My current code is :
({
	openResidentialform: function(component, event, helper) {
	var urlEvent = $A.get("e.force:navigateToURL");   
    urlEvent.setParams({
      "url": "/apex/ResidentialForm"
    })
My Component looks like this:
<aura:component implements="flexipage:availableForAllPageTypes" access="global">    
   <aura:attribute name="FFform" type="String" default="Fact Finder Form" access="global" />	
       
<div class="FFbuttons"> 
    <div aria-labelledby="FFformB">            
         <fieldset class="slds-box slds-theme--default slds-container--fluid">       
          <legend id="FFform" class="slds-text-heading--small">Fact Finder Forms</legend>
    
             <form class="slds-form--inline">    
    
         <div class="slds-form-element">
          <ui:button label="Residential Landlord"                     
                     class="button"
                     press="{!c.openResidentialform}" />
          </div>    
</form>         
  </fieldset>        
  </div>
 </div>
</aura:component>
I could not find any solutions in all the forums I read.
Any help will be greatly appreciated.
Sylvie
Upon completing the challenge for "Chatter Basics- Approving Records from the Feed" I keep running into an incomplete error.

"Challenge Not Yet complete...here's what's wrong:
There was an unexpected error in your orf which is preventing this assifgnemtn scheck from completing:
System.DmlException: Process failed.  First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable apprival pricess was found.:[]

My mentor and I both have attempted several variations but have not been able to achieve completing this task.  Any insight?  Thank you!
I have a form that you can create an item and assign the item to a user in an org. I want to display the user names in the inputSelect, but when the form creates the new item, saves the users Id
 
<div>
    	<h1>New Whiteboard Item</h1>
        <ui:inputText label="Name" aura:id="name" value="{!v.newWhiteboardItem.Name}" />
        <ui:inputDate label="Due Date" aura:id="ItemDueDate" displayDatePicker="true" value="{!v.newWhiteboardItem.TouchpointDev__Item_Due_Date__c}" />
        <ui:inputSelect label="Assign To" aura:id="ItemAssignTo" value="{!v.newWhiteboardItem.TouchpointDev__AssignedTo__c}" />
        <ui:inputCheckbox label="High Priority" aura:id="ItemHighPriority" value="{!v.newWhiteboardItem.TouchpointDev__High_Priority__c}" />
        <ui:button label="Save" press="{!c.newWhiteboardItem}" />
</div>

In the doInt function I have this
loadOrgUsers : function(component) {
        var orgUsersDB = component.get("c.getUsersDB");
        orgUsersDB.setCallback(this, function(response) {
        var state = response.getState();
        if(component.isValid() && state == "SUCCESS") {
            console.log(response.getReturnValue());
            component.find("ItemAssignTo").set("v.options", response.getReturnValue());
        }
    });
    $A.enqueueAction(orgUsersDB);
},
The console.log returns an array of objects the the users Id and Name. The picklist is blank, but there are 4 blank rows, so it looks like I need to choose whether to display the user name or id, obviously the name. How do I do that?
 
Hello,

I have read material that says I can add an app to the navigation bar in Lightning, I have read an Ideas Exchange post that says it was added in Spring 16.  However I created an app and it is not listed in the available items to add to the navigation bar and searching for it does not result in finding it.

Anyone know how to do this or if it is possible?

Thanks.
Hi team,

I need a help, I'm using Lightning in my VF to look a like, this VF need generated as PDF after user click in button, but the styles using Lightning was lost, how to solve this?

another problem is, I user apex:chart to show bars with some numbers, but how i used Lightning in my VF, the bars not show me, it is crazy hahaha...how to solve this issue too?

Thanks team.
<aura:application >
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system-ltng.css" />
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system-scoped.css" />
    <ltng:require styles="/resource/SLDS100/assets/styles/salesforce-lightning-design-system.css" />
    <ltng:require scripts="/resource/jquery214"  afterScriptsLoaded="{!c.afterScriptsLoaded}"/>
    
    <div class="slds-tabs--scoped">
  <ul class="slds-tabs--scoped__nav" role="tablist">
    <li class="slds-tabs--scoped__item slds-text-heading--label slds-active" title="ALL Accounts" role="presentation"><a class="slds-tabs--scoped__link" href="javascript:void(0);" role="tab" tabindex="0" aria-selected="true" aria-controls="tab-scoped-1" id="tab-scoped-1__item" onclick="selectTab(this);">All Accounts</a></li>
    <li class="slds-tabs--scoped__item slds-text-heading--label" title="ALL Contacts"
      role="presentation"><a class="slds-tabs--scoped__link" role="tab" tabindex="-1" aria-selected="false" aria-controls="tab-scoped-2" id="tab-scoped-2__item" onclick="{!c.selectTab}" data="{tab-scoped-3__item}">All Contacts</a></li>
    <li class="slds-tabs--scoped__item slds-text-heading--label" title="Item Three"
      role="presentation"><a class="slds-tabs--scoped__link" href="javascript:void(0);" role="tab" tabindex="-1" aria-selected="false" aria-controls="tab-scoped-3" id="tab-scoped-3__item" onclick="{!c.selectTab}" data="{tab-scoped-3__item}">Item Three</a></li>
  </ul>
        <div id="tab-scoped-1" class="slds-tabs--scoped__content slds-show" role="tabpanel" aria-labelledby="tab-scoped-1__item">
            ALL CONTACTS<c:ContactList />
        </div>
        <div id="tab-scoped-2" class="slds-tabs--scoped__content slds-hide" role="tabpanel" aria-labelledby="tab-scoped-2__item">
            ALL ACCOUNTS<c:AccountsList />
        </div>
        <div id="tab-scoped-3" class="slds-tabs--scoped__content slds-hide" role="tabpanel" aria-labelledby="tab-scoped-3__item">
            Item Three Content
        </div>
    </div>
</aura:application>

what i have to write for enabling Tab ? Please share javascript if possible.
  • July 07, 2016
  • Like
  • 0
Hi ,
Based on my requiremnets i have created a single compenent in which i am showing the details.On page launch it will show a particular tab for instance the Channel tab  in this case but on click of other tabs like Overview or Team Members ,it is suppose to show the tab specific detail on the same page but it is not working as intended .I have placed the tab specific details in <div> tag but still on click of a tab its not showing the details.I also want the selected tab to be highlighted with the same background.I would like to have a  solution on this issue.Please help on this.I have attached the screenshot .Please refer it .Thanks in advance.
Feel free to ask any qusetion sif you have any doubt.Salesforce Lightning
Hi,

I have passed a single value to my server side apex controller using the following code

action.setParams({ "searchKey" : elemVal });

Now i want to pass one more argument along with elemVal. I tried the following code but i am getting null.

action.setParams({ "searchKey" : elemVal },{"temp" : t}):

Please help
  • June 24, 2016
  • Like
  • 0
Hi All,

As per my knowledge Trigger is running System mode. But i wanna run in User Mode. How?

Regards,
VSK 98
  • June 23, 2016
  • Like
  • 0
Hi All,

I have VF page, where i have added that page in salesforce sites to acess that VF page for the for the external user. Now my problem is user is able to access my VF page without authentication. Salesforce is not asking any authentication.

I have tried by removing my page acess following below mentioned steps but external user is not able to access VF page. User is getting insufficiant privilege error message.

Go to Setup -> Communities -> All Communities -> click Manage -> Administration -> Pages -> Go to force.com -> Click on public access settings.

Can anyone advise me how to access Salesforce site VF page with authentication

Thanks,

Regards,
Anil Kumar

 

How to show success message after record successfully saved to server.

 

I unable load my lightning component in a ligtning app page due to Cross-Origin Request error . I'm getting below mentioned error in the console

   Font from origin 'https://xxx-dev-ed.my.salesforce.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://xxx-dev-ed.lightning.force.com' is therefore not allowed access. The response had HTTP status code 404. 

So can any one please suggest me the right answer to fix this issue..
 
I have a Lighting app which was working fine, before Spring'16 release.

There were issues with Jquery 3.0 thus, downgraded to Jquery 2.2.4;  When I am trying to access html select element, it is giving undefined.

I am accessing html select element's selected value on 'onchange' event,
var selectedVal = $('#'+event.srcElement.id).val();

This is giving an error:

Something has gone wrong. Action failed: c$PsetComp$controller$permissionSetNamesddlChange [TypeError: undefined is not an object (evaluating 'options.length')]
Failing descriptor: {c$PsetComp$controller$permissionSetNamesddlChange}.
Please try again.


It is trying to access the length of options to find the selected value but as the element itself is undefined it is giving an error.

Same happened even when I have tried with html select element's id instead of event.srcElement.id

var selectedVal = $('#selectElementId').val(); 

The most interesting fact is, I am able to add options dynamically, i.e., there is no problem with accessing the html element but the issue is with accessing val();

      var fragment = document.createDocumentFragment();
      var opt = document.createElement('option');
      opt.innerHTML = "Chooseoption";
      opt.value = "Nothingelected";
      fragment.appendChild(opt);
      $('#permissionSetNamesddl').append(fragment);


 The above code isn't giving any error.

All of it was working fine before Spring'16 release.
I am trying to just add a sucess message when the user enters a case, I am obviously new to Apex and can't figure out how to do this. When I put this in I get the following error message on the success - ​Keep getting the error message - Non-void method might not return a value or might have statement after a return statement.

 // Insert the case
                INSERT c;
                if (objAttachment.Body != null) {
                    // Insert attachment if exists
                      objAttachment.ParentId = c.Id;
                    insert objAttachment;
                }
                
                 ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.CONFIRM, 'Success!'));
            } catch (Exception e) {
                ApexPages.addMessages(e);
                return null;
            }
        }
    }

Thank you very much for any information on how to do this. 
I have a Community built in Community Builder that uses lightning components and the Lightning Design System css & asset package.  I am using one of the svg icons from the SLDS assets, and it's working fine in the sandbox (the published community in the sandbox is rendering the icon as expected).

However, now that the community is in Production, the published pages are not displaying the icon, and I'm getting a 404 error when the page tries to load the asset: "https://myclientsorg.force.com/resource/SLDS0122/assets/icons/custom-sprite/svg/symbols.svg "  This is the path to the asset that's failing to load.  However, I'm using the CSS from the same package, so it's just the svg symbols that aren't showing up.

Can anyone provide any insight??