• Bhuvan Pasham
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
Hi,
I am trying to navigate to a Newly setup tab using a lightning component. When navigating to the component, I would like to pass-in a parameter. I tried passing using using URL while firing e.force:navigateToURL event - but it seems like that's NOT going to work. Any help is greatly appreciated.

Thanks in advance
Apex code is failing with an obscure error on simple arithmatic. I am new to salesforce trying to port .Net application to force.com. In my 25+ years of programming career, I always assumed this is the fundamental to programming and multiplication never fails. 
Can anyone suggest what might be happening here please...

invx = Amount * pct; //All three varibles are declared double; Amount = 1000000; pct = 0.00341000000;

Please help...

Here is the log ---
3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (270584532)|VARIABLE_ASSIGNMENT|[92]|pct|0.007850957424257888
09:13:52.4 (270589471)|STATEMENT_EXECUTE|[93]
09:13:52.4 (270598139)|HEAP_ALLOCATE|[93]|Bytes:5
09:13:52.4 (270616177)|ENTERING_MANAGED_PKG|
09:13:52.4 (270637775)|HEAP_ALLOCATE|[93]|Bytes:20
09:13:52.4 (270650886)|HEAP_ALLOCATE|[93]|Bytes:25
09:13:52.4 (270663155)|ENTERING_MANAGED_PKG|
09:13:52.4 (270666682)|USER_DEBUG|[93]|DEBUG|PCT: 0.007850957424257888
09:13:52.4 (270673475)|STATEMENT_EXECUTE|[94]
09:13:52.4 (270680995)|HEAP_ALLOCATE|[94]|Bytes:8
09:13:52.4 (270748567)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"AllocationRule":"0x78883bfd","Amount":1000000,"EffectiveDate":"2016-06-22T00:00:00.000Z","Fund":"0x15ef0b75","FundCommitment":3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (270776435)|ENTERING_MANAGED_PKG|
09:13:52.4 (270781172)|HEAP_ALLOCATE|[94]|Bytes:7
09:13:52.4 (270792207)|HEAP_ALLOCATE|[94]|Bytes:15
09:13:52.4 (270802287)|ENTERING_MANAGED_PKG|
09:13:52.4 (270805630)|USER_DEBUG|[94]|DEBUG|Amount: 1000000
09:13:52.4 (270812096)|STATEMENT_EXECUTE|[95]
09:13:52.4 (270874136)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"AllocationRule":"0x78883bfd","Amount":1000000,"EffectiveDate":"2016-06-22T00:00:00.000Z","Fund":"0x15ef0b75","FundCommitment":3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (271195406)|FATAL_ERROR|Internal Salesforce.com Error
09:13:52.271 (271208621)|CUMULATIVE_LIMIT_USAGE

 
I have implemented a custom Lookup component based on tutorial by Tony Scott and code. Component works perfectly when used in a standalone app but the search result list doesn't render when added to the record home page. Html is properly being rendered but it looks like it is going under the other components below or something like that. User cannot see the list. I tried fixing component height in record home - with no luck on seeing search result. No errors in Js console either. This is the same markup provided on slds.

I am trying to build by first lightning component - any advise is greatly appreciated.
Apex code is failing with an obscure error on simple arithmatic. I am new to salesforce trying to port .Net application to force.com. In my 25+ years of programming career, I always assumed this is the fundamental to programming and multiplication never fails. 
Can anyone suggest what might be happening here please...

invx = Amount * pct; //All three varibles are declared double; Amount = 1000000; pct = 0.00341000000;

Please help...

Here is the log ---
3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (270584532)|VARIABLE_ASSIGNMENT|[92]|pct|0.007850957424257888
09:13:52.4 (270589471)|STATEMENT_EXECUTE|[93]
09:13:52.4 (270598139)|HEAP_ALLOCATE|[93]|Bytes:5
09:13:52.4 (270616177)|ENTERING_MANAGED_PKG|
09:13:52.4 (270637775)|HEAP_ALLOCATE|[93]|Bytes:20
09:13:52.4 (270650886)|HEAP_ALLOCATE|[93]|Bytes:25
09:13:52.4 (270663155)|ENTERING_MANAGED_PKG|
09:13:52.4 (270666682)|USER_DEBUG|[93]|DEBUG|PCT: 0.007850957424257888
09:13:52.4 (270673475)|STATEMENT_EXECUTE|[94]
09:13:52.4 (270680995)|HEAP_ALLOCATE|[94]|Bytes:8
09:13:52.4 (270748567)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"AllocationRule":"0x78883bfd","Amount":1000000,"EffectiveDate":"2016-06-22T00:00:00.000Z","Fund":"0x15ef0b75","FundCommitment":3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (270776435)|ENTERING_MANAGED_PKG|
09:13:52.4 (270781172)|HEAP_ALLOCATE|[94]|Bytes:7
09:13:52.4 (270792207)|HEAP_ALLOCATE|[94]|Bytes:15
09:13:52.4 (270802287)|ENTERING_MANAGED_PKG|
09:13:52.4 (270805630)|USER_DEBUG|[94]|DEBUG|Amount: 1000000
09:13:52.4 (270812096)|STATEMENT_EXECUTE|[95]
09:13:52.4 (270874136)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"AllocationRule":"0x78883bfd","Amount":1000000,"EffectiveDate":"2016-06-22T00:00:00.000Z","Fund":"0x15ef0b75","FundCommitment":3.82119E8,"LegalEntity":"0x2571e4d6","LocalAmount":1000000,"Tranche":"0xeae7d67","TransType":"0x509ac97c"}|0x441684fe
09:13:52.4 (271195406)|FATAL_ERROR|Internal Salesforce.com Error
09:13:52.271 (271208621)|CUMULATIVE_LIMIT_USAGE

 
I am working on a lightning component where I want to show picklist field using as follows. `
<aura:component > 
    <aura:attribute name="conObj" type="Contact" default="sobjectType:'Contact'}"/> 
​    <force:inputField value="{!v.conObj.Salutation}" aura:id="pic"/> 
</aura:component>`
The above code works fine in my developer org but not working on sandbox. When I try to run this by adding in an app throws some exception. Although same component works in same sandbox if I replace inputField with outputField.

Is there any solution for this ?
Objects with a single layer work fine, but when I try to use an object that goes deeper than one layer I receive an unknown server error when trying to access the variable on the server side user parameter.get('objectPropertyName') see code below.

So this code works as gateway is a simple string. However whenever I try to make gateway an object I start getting errors
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);



This code gives me an error when trying to access the parameter map in the server side controller. 
       /*******************************************************************************************************
        * @description Test saving configuration
        */
        var saveConfiguration = component.get("c.testSomething");

        // Set save configuration parameters.
        saveConfiguration.setParams({
            testSome : 'Hello World!',
            config : {
                gateway: 'Stripe'
            }
        });

        // Setup save configuration callback
        saveConfiguration.setCallback(this, function(a) {
                if (a.getState() === "SUCCESS") {
                   // Do something with return value
                } else if (a.getState() === "ERROR") {
                    $A.error("Errors", a.getError());
                    $A.log("Errors", a.getError());
                }
            });

        // Queue the transaction action
        $A.enqueueAction(saveConfiguration);




Here's my server side controller method:
@AuraEnabled
public static void testSomething(String testSome, Map<String, Object> config) {
    System.debug(config.get('gateway'));
}

So in summary whenever gateway is a simple string everything works... The second I try to use an object I start getting errors. I'd prefer to use one of my Apex classes instead of a Map<String, Object> for the parameter, but I was having no luck with that. Any help is much appreciated!
 
I want to show the lookup field in lightning page. plaese any one knows reply to this post.
using this below component to create fields in lightning page. please any one knows modify the partner group and account filed as lookup. please find the below code modify it.
<aura:component implements="force:appHostable">
    
    <ltng:require styles="/resource/bootstrap"/>
    <aura:attribute name="Recipient" type="Recipient__c[]"/>
        <aura:attribute name="newARecipient" type="Recipient__c"
             default="{ 'sobjectType': 'Recipient__c',
                         'Name': '',
                         'Account__c': '',
                           'Actor_Type__c':'',
                           'Partner_Group__c':'',
                           'Request__c':''
                       }"/>

   <div class="bootstrap-sf1" >
    <div class="container">
        <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Recipient Name</label>
                    <span class="col-sm-8">
         
                    
                
                    <ui:inputText aura:id="recipientName" 
                                  class="form-control" 
                                  value="{!v.newARecipient.Name}"
                                  placeholder="Recipient Name"/>
</span>
</div>
            </div>
<div class="row" >
           
                <div class="col-sm-6">
                    <label class="col-sm-4" >Request</label>
                    <span class="col-sm-8">
         
                    <!-- If you registered a namespace, the attribute values must include your namespace -->
                    <!-- For example, value="{!v.newExpense.myNamespace__Amount__c}" -->
                    <ui:inputText aura:id="request" 
                                    class="form-control"
                                    value="{!v.newARecipient.Request__c}"
                                    placeholder="Request" />
        
                    </span>
                </div>
    </div>
        <div class="row" >
           
                <div class="col-sm-6">
                    <label class="col-sm-4" >Actor Type</label>
                    <span class="col-sm-8">
                    <ui:inputSelect aura:id="actortype" >
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Actor_Type__c}" />
                        
                        </aura:iteration>
                        <ui:inputSelectOption text="select Actor"/>
                        <ui:inputSelectOption text="Requestor"/>
                        <ui:inputSelectOption text="Responder"/>
                    </ui:inputSelect>
                    </span>
                </div>
            </div>
            <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Partner Group</label>
                    <span class="col-sm-5">
                    
                    <ui:inputSelect aura:id="partnergroup"  change="{!c.onSelectChange}">
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Partner_Group__c}" />
                        </aura:iteration>
                        <ui:inputSelectOption text="Requestor"/>
                    </ui:inputSelect>
                    </span>
                </div>
                </div>
                <div class="row" >
            
                <div class="col-sm-6">
                    <label class="col-sm-4" >Account</label>
                    <span class="col-sm-8">    
                    <ui:inputSelect aura:id="account" change="{!c.onSelectChange}">
                        <aura:iteration items="{!v.Recipient__c}" var="recipient">
                            <ui:inputSelectOption text="{!recipient.Id}" label="{!recipient.Account__c}" />
                        
                        </aura:iteration>
                    <ui:inputSelectOption text="Requestor"/>
                    </ui:inputSelect>
                    </span>
                </div>
                    </div>
         <div class="row " >
        <div  style="text-align:center;font-weight:bold;color:Black;">
             <div class="col-sm-6">
       <span class="col-sm-1">
                    <ui:button label="Save" press="{!c.createRecord}" />
            </span>
            <span class="col-sm-1">
                    <ui:button label="cancel" press="{!c.cancel}"/>
            </span>     
            <span class="col-sm-1">
                <ui:button label="save and new" press="{!c.saveAndNew}"/>
            </span>
            </div>
            
             </div>
        </div>
       </div>
        
        </div>
</aura:component>
I'm following the example shown on Peter Knolle's post here: https://developer.salesforce.com/blogs/developer-relations/2015/03/lightning-component-framework-custom-events.html

When creating the contactSearch Component, I'm getting the following error:

"Failed to save undefined: No CONTROLLER named apex://mynamespace.ContactSearchController found: Source"

I'm not sure what I've missing - any thoughts?