• Rajat Mahajan 28
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 3
    Replies
Hi All,

I cam across a scenario while making my functionality in lightning a managed package. 

Before having a namespace, my functionality was wrking fine where I was able to receive the attributes from another component in the init method perfectly fine when the component was dynamically created. 

this attributes stopped coming in child when I create a namespace

Any clues ?
 
Dear All

I have a requirement where i need to set lightning tab attributes on page load , this somehow does not work when i get these attributes from server side call

Consider this snippet:
<!--
Name   : PinUnpin.cmp
Author : Rajat Mahajan
Date   : 24th April, 2018
Desc   : This component will showcase the pin unpin functionality on account button click
-->
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="GLOBAL" controller="PinUnpinController">
    <!-- Style sheet LDS -->
    <ltng:require styles="{!$Resource.SDLS252 + '/styles/salesforce-lightning-design-system.css'}"/>
    
    <!-- Tabset variables -->
    <aura:attribute name="tabNameList" type="Map" />
    <aura:attribute name="moretabs" type="Aura.Component[]"/>
    <aura:attribute name="selTabId" type="String" />
    
    <!-- Default tab variables -->
    <aura:attribute name="defaultTabLabel" type="String" default="test"/>
    <aura:attribute name="defaultTabID" type="Integer" default="test"/>
    
    <!-- Call the int method -->
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> 
 
    <!-- Lightning Tab set -->
    <lightning:tabset aura:id="tabs" variant="scoped" selectedTabId="{!v.selTabId}" >
        <div style="display:block">
            <lightning:tab aura:id="defaultTabAuraID" label="{!v.defaultTabLabel}" id="{!v.defaultTabID}" >
                {!v.body}
            </lightning:tab>
        </div> 
        {!v.moretabs}   
    </lightning:tabset>
</aura:component>

now my doInit here sets the defaultTabLabel and defaultTabID correctly when i set them from JS Controller directly, but whenever i make server side (Apex) calls from the doInit method, the attributes get set on cmp but do not get set in the lightning tab for some reason. 

I believe there is something in the rendering lifecycle that is giving me this problem. I tried to use javascript promise functions also, but was of no help

Has anyone else encountered this problem?

Thanks for your help in advance!
Hello

I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo

In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt

However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP

Where : 
00NJ0000001x7yoMAA = Id field of Custom Field 
00QJ000000AQSUtMAP = Id field of lead record

The custom lookup field somehow does not get populated.
I had prepended the id with CF as indicated in some articles, however, did not work with or without that

Thanks in advance
Rajat
Hey! 

I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo

In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt

However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP

Where : 
00NJ0000001x7yoMAA = Id field of Custom Field 
00QJ000000AQSUtMAP = Id field of lead record

The custom lookup field somehow does not get populated.

Kindly help me with this and let me know if this is possible.

I had prepended the id with CF as indicated in some articles, however, did not work with or without that

Regards
Rajat 
Dear All

I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo

In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt

However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP

Where : 
00NJ0000001x7yoMAA = Id field of Custom Field 
00QJ000000AQSUtMAP = Id field of lead record

The custom lookup field somehow does not get populated.

Kindly help me with this and let me know if this is possible.

I had prepended the id with CF as indicated in some articles, however, did not work with or without that

Regards
Rajat 
 
Hi All,

I cam across a scenario while making my functionality in lightning a managed package. 

Before having a namespace, my functionality was wrking fine where I was able to receive the attributes from another component in the init method perfectly fine when the component was dynamically created. 

this attributes stopped coming in child when I create a namespace

Any clues ?
 
Hello

I am facing a major challenge in prepopulating values in a custom lookup field from a URL (I am redirected to a new record standard page)
URL :
https://cs10.salesforce.com/001/e?acc2=Greg+Hewitt&CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP&nooverride=1&retURL=%2F001%2Fo

In the above URL : i am able to prepopulate the standard name field of account from the url param:
acc2=Greg+Hewitt

However, there is a custom field on account called convertedfromlead__c (which is a lookup to lead)
The above needs to be populated from:
CF00NJ0000001x7yoMAA=00QJ000000AQSUtMAP

Where : 
00NJ0000001x7yoMAA = Id field of Custom Field 
00QJ000000AQSUtMAP = Id field of lead record

The custom lookup field somehow does not get populated.
I had prepended the id with CF as indicated in some articles, however, did not work with or without that

Thanks in advance
Rajat