• Abhilash M
  • NEWBIE
  • 0 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 4
    Replies
i have three fieldson a form,- start date , end date , due date . All these three fields are present on a  form component .
When I open the Lightning app i need to see these fields with default values.

default values  are

start date  is todays date

end date is todays date +30  days

due date is  start date +1 day

please help me


 
I have Lightning components,Lightning Apps, Apex classes in my Salesforce org. I need to Integrate them with the Github. So that I can  collaborate with my team to push the code and pull the code from my team projects.




 
example
 name: {!.v.name}
address:{v.address}
phone:{v.phone}

output:

name:        bob
address​​​​​:    California
Phone:      ​852-895-7854

Please tell me your suggestions​
public class OwnerController
{


@AuraEnabled
public static List<Contact> getOwner()
{
List<Contact> Owner =
[select name from user where id =: Userinfo.getUserId()].name;];

return Owner;
}


    
}
How to make an lightning application developed on developer console , to be made available  on  a Salesforce1 Mobile App?
I would like to know how to use sldsI am trying to use the salesforce lightning design system for styling my application. I am just copying and pasting the code which are present  in slds for various components , Still I am getting an error in my CSS component of my App.

How to use the   SCSS of the slds in our App.?

I have referred to the Trailhead, STill  I am not able to figure out how to use the styling slds in my app?

For example :I am using the SCSS of forms component here 


.slds-input {
  @include form-states;
  display: inline-block;
  padding: 0 $spacing-medium 0 $spacing-small;
  line-height: $line-height-button;
  min-height: calc(#{$line-height-button} + 2px); /* For IE */
}

.slds-input--small {
  @include placeholder($weight: $font-weight-regular);
  line-height: $line-height-button-small;
  min-height: calc(#{$line-height-button-small} + 2px); /* For IE */
  padding: {
    left: $spacing-x-small;
    right: $spacing-x-small;
  }
}

.slds-input--bare {
  background-color: transparent;
  border: none;
  color: $color-text-default;

  &:focus,
  &:active {
    outline: 0;
  }
}

.slds-input-has-icon {
  position: relative;

  .slds-input__icon {
    @include square($square-icon-medium-content);
    position: absolute;
    top: 50%;
    margin-top: (($square-icon-medium-content / 2) * -1);

    @include deprecate("0.20.0") {
      fill: $color-text-icon-default;
    }
  }

  &--left {
    .slds-input__icon {
      left: $spacing-small;
    }

    .slds-input,
    .slds-input--bare {
      padding-left: $spacing-x-large;
    }
  }

  &--right {
    .slds-input__icon {
      right: $spacing-small;
    }

    .slds-input,
    .slds-input--bare {
      padding-right: $spacing-x-large;
    }
  }
}

what does the @include form-states;  refer to ? what is the use in CSS?
I want to create an Salesforce 1 lightning app displays the records of a custom object in the home screen . Please send me the source code and let me know how to accomplish this ?
Field Integrity ExceptionI have component called Accountlist, and controller class called Accountlistcontroller   

Accountlist component is using the Accountlistcontroller  cclass as the controller

when i save the component it is giving an error as FieldIUntegrity_Exception.

Failed to save undefined: No CONTROLLER named apex://Appsol.MyContactListController found: Sourc

Appsol is the name of my namespace

Please help me. fix this error
Below is my code

@RestResource(urlMapping='/v1/accounts/*')
global with sharing class REST_AccountService_V1 {
@HttpGet
global static Account doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Account result = [SELECT Id, Name, Phone, Website, BillingState FROM Account WHERE External_Id__c = :accountId];
return result;
}
}

When I try to test the above Rest service in SOAPUI Tool
I am getting an error as below:




[ERROR:]Service not found at: /services/apexrest/AccountRaw ResponseHTTP/1.1 404 Not Found Date: Fri, 30 Oct 2015 06:35:33 GMT Set-Cookie: BrowserId=-MDkUrODQ_K2MkY-SmGwqw;Path=/;Domain=.salesforce.com;Expires=Tue, 29-Dec-2015 06:35:33 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "errorCode" : "NOT_FOUND", "message" : "Could not find a match for URL /Account" } ]

Do I need to create a Remote site URL also ?How does it help? 
Hi 

My company is working on a project related to salesforce1 app.
We need to develop a App that will fetch realtime data from SAP.

Let me know the ways to integrate data between SAP and Salesforce
 
Below is my code

@RestResource(urlMapping='/v1/accounts/*')
global with sharing class REST_AccountService_V1 {
@HttpGet
global static Account doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Account result = [SELECT Id, Name, Phone, Website, BillingState FROM Account WHERE External_Id__c = :accountId];
return result;
}
}

When I try to test the above Rest service in SOAPUI Tool
I am getting an error as below:




[ERROR:]Service not found at: /services/apexrest/AccountRaw ResponseHTTP/1.1 404 Not Found Date: Fri, 30 Oct 2015 06:35:33 GMT Set-Cookie: BrowserId=-MDkUrODQ_K2MkY-SmGwqw;Path=/;Domain=.salesforce.com;Expires=Tue, 29-Dec-2015 06:35:33 GMT Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked
[ { "errorCode" : "NOT_FOUND", "message" : "Could not find a match for URL /Account" } ]

Do I need to create a Remote site URL also ?How does it help? 
example
 name: {!.v.name}
address:{v.address}
phone:{v.phone}

output:

name:        bob
address​​​​​:    California
Phone:      ​852-895-7854

Please tell me your suggestions​
public class OwnerController
{


@AuraEnabled
public static List<Contact> getOwner()
{
List<Contact> Owner =
[select name from user where id =: Userinfo.getUserId()].name;];

return Owner;
}


    
}
I am in the process of developing a lightning component but I have been running into issues when using the lighting app builder.

When navigating to People Tab > My User > Edit Page, I receive this error:

User-added image

As you can see, an error has happened during load. Notice that the error is behind the loading <div> rendering it unclickable.


I thought that this was an error in my own code. I deleted all lightning code from my org and tried again:

User-added image

I received this error in the console:
User-added image

In the first picture of this post, I was able to remove the loading box by deleting <div class="auraMsgBox auraLoadingBox" id="auraLoadingBox"></div> from the dom. Behind it was this error:

Uncaught error in umps|NA16$00Dj0000000KmGP_005j0000000S88z_02_7bc8b1ef-5370-411e-8ba8-673ec79653ca|0| : Converting circular structure to JSON

Has anyone seen this before or know of a fix/workaround?
I created a Lightning app sometime back. It was working fine some days back but now I am getting the exception Uncaught expeption in action callback: Cannot read property 'set' of undefined when I try to access it using the URL. Can anyone please guide me on this?

App
<aura:application implements="force:appHostable">
    <link href='/resource/bootstrap/' rel="stylesheet"/>
   
    <aura:handler event="c:navigateToForm" action="{!c.navigateToForm}"/>
    <aura:attribute name="presName" default="None" type="String" />
     <aura:attribute name="presDate" type="Date" />
    <aura:attribute name="evtName" type="String" default="----None----"/>
    <aura:attribute name="loggedIn" type="Boolean"/>
    <!--<aura:attribute name="presType" type="String" /> -->
    
    <div class="container-fluid" aura:id="content">
     
            
       
    <c:loginForm presName="{!v.presName}" presDate="{!v.presDate}" evtName="{!v.evtName}"/>
    <!--<aura:if isTrue="{!v.loggedIn}"><c:registrationForm presName="{!v.presName}" presDate="{!v.presDate}" evtName="{!v.evtName}"/></aura:if>-->
        <aura:renderIf isTrue="{!v.loggedIn}">
            <c:registrationForm presName="{!v.presName}" presDate="{!v.presDate}" evtName="{!v.evtName}"/>
        </aura:renderIf>
        
        
    </div>
	
</aura:application>
AppController
 
({
	navigateToForm : function(component, event, helper) {
      );
		var dest = "markup://c:" + event.getParam("view") + "Form";
      
        $A.componentService.newComponentAsync(this, function(view) {
          
            var content = component.find("content");
              
            content.set("v.body", view);
            //component.set("v.body", "Hello World!");
        },  {
            componentDef: dest,
            attributes: {
                values: {
                    presName: "{!v.presName}",
                    presDate: "{!v.presDate}",
                    evtName: "{!v.evtName}"
                    //presType: "{!v.presType}",
                }
            }
        }, component);
	}
})

cmp1
 
<aura:component controller="loginFormController" access="global" implements="force:appHostable">
    <link href='/resource/bootstrap/' rel="stylesheet"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <!--<aura:registerEvent name="navigateToForm" type="c:navigateToForm"/>-->
    <!--<aura:handler event="c:navigateToForm" action="{!c.handleNavigation}"/>-->
    <aura:attribute name="loggedIn" type="Boolean" default="false"/>
	<aura:attribute name="registrations" type="Registrations__c[]"/>
    <aura:attribute name="login" type="Registrations__c"
        default="{ 'sobjectType': 'Registrations__c',
        'Event_Presenter__c': '',
        'Event_Date__c': '',
        'Event_Name__c': ''
        
    }"/>
   
   <aura:attribute name="presName" type="String" />
    <aura:attribute name="presDate" type="Date" />
    <aura:attribute name="evtName" type="String" />
    <!--<aura:attribute name="presType" type="String" />-->
    <aura:attribute name="isInHouse" type="Boolean" default="true" />
    
    
    <div class="container main-container">
        <!--<p><img src="/resource/EAHeader/"/></p>-->
         <table width="100%">
            <tr>
            <td style="text-align:left;">
            <img src="/resource/login/"/>
                </td>
            <td style="text-align:right;">
        <img src="/resource/EALogo/" />
                </td>
            
            </tr>
        </table>
        
       
    <form>
        <fieldset>
        <br></br>
        <br></br>
        <br></br>           
       
        <ui:inputText aura:id="presenterName" label="Presenter Name"
        class="form-control input-lg"
        value="{!v.presName}" required="false"/>
        
        <br></br>
        <br></br>
          
        <ui:inputDate aura:id="presentationDate" label="Presentation Date"
        class="form-control input-lg"
        value="{!v.presDate}" displayDatePicker="true"/>
        
         <br></br>
         <br></br>
            
        <ui:inputSelect aura:id="evName" label="Event Name"
        class="form-control input-lg" value="{!v.evtName}" change="{!c.onEvtNameChange}">
        	 <ui:inputSelectOption text="In-house Presentation"/>
        	 <ui:inputSelectOption text="Engineers Australia Event"/>
             <ui:inputSelectOption text="External Industry Event"/>
             <ui:inputSelectOption text="Other"/>
        </ui:inputSelect>
         
         <br></br>
         <br></br>
            <!--<div id="over" class="overlay" >
        
            <ui:inputText aura:id="presentationType" label="Presentation Type"
            class="form-control input-lg"
            value="{!v.presType}" required="false"/>
        	<br></br>
            <br></br>
            <br></br>
            </div>-->
            
         
            
        <ui:button class="btn-xlarge" label="Login" press="{!c.gotoForm}"/>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
             <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
             <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
            <br></br>
        </fieldset>
    </form>
    
</div>  
</aura:component>
cmp1 Controller
({
	doInit : function(component, event, helper) {
      
		helper.getUserDetails(component);
        helper.getCurrentDate(component);
        
	},
    
    gotoForm : function(component, event, helper) {
        console.log("Navigating to Regitration Form >>>>>>>>>>>>>>>>>");
        //helper.getUserDetails(component);
        var evt = $A.get("e.force:navigateToComponent");
   
        if(evt == null){
        	
            evt = $A.get("e.c:navigateToForm");
            evt.setParams({view: "registration"}).fire();
        }
        else{
            evt.setParams({
                componentDef: "c:registrationForm",
                componentAttributes: {
                	presName: component.get("v.presName"),
                    presDate: component.get("v.presDate"),
                    evtName: component.get("v.evtName"),
                    //presType: component.get("v.presType")
            	}
                
        	});
    		evt.fire();  
        }
      
       
       component.set("v.showLogin",false);
        component.set("v.loggedIn",true);
    },
    
    onEvtNameChange: function(cmp, evt) {
         var selectCmp = cmp.find("evName");
         //resultCmp = cmp.find("singleResult");
         console.log("Inside onEvtNameChange >>" + selectCmp );
         console.log("selectCmp.get(\"v.value\") >>>" + selectCmp.get("v.value") );
        var evt = selectCmp.get("e.toggle");
        console.log("evt>>>>" + evt);
        var el = document.getElementById("over");
        if(selectCmp.get("v.value") == "In-house Presentation"){
            //cmp.set("v.isInHouse","false");
            el.style.visibility = "visible";
            //cmp.
        }
        else{
            el.style.visibility = "hidden";
        }
        
        
       
   },

    
  
})