• SFDC Forum 9
  • NEWBIE
  • 45 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 20
    Questions
  • 21
    Replies
While migrating classic code to lightning, i have come across below issue.

wsdl2apex based apex class is not being called when i run the code from lighntning, same wokrs in classic, please help asap
Hi

I got to place lightning comp in utility items, but v.recordId is throwing null in 'init' function.same works in cmp framework.

As per one of the forums, I was suggsested to use 'afterRender'. i have tried , somehow i did not get exptected result.

So i have done research, and used 'render' as below.I am able to capture recordId in "onRender".

But when I use this "component.set()" to assign some value  to one of the attributes in "onRender", it is getting called continuosly (more than 100 times)


<aura:handler name="render" value="{!this}" action="{!c.onRender}"/>

Please suggest ASAP
Hey Folks,
Please advice.

I have two objects with master detailed relationship. Contact and its plans.

I have custom field on contact where i have to populate its value as YES if "XYZ" plan is listed for that contact else as "NO"

Please assist the effective way to achieve this.
Hey folks, please help me how to achieve below requirement.

In vf code, when i click on  one column in block table , it has to download  attachment(parent.type = case)   and show  relevant case related details like status, origin in second page block table.


I am able to download when i click on feild, but not able to retrieve data and show in second table.

Note that, second block table should not be visible at all until i click on the attachment.
sforce.console.getEnclosingPrimaryTabId(closeTab);

var closeTab= function closeTab(result){
var a=result.id;
console.log(a) ; 
// in console, i get expected value in classic app
// same code gives null value in lightning
}


I understood somewhat from blogs that this does not support in lightning, am i correct.If yes, can you help me with alternative
I got to migrate the vf page, it has aroung 2-3k lines of code.

Only these liness are not supportable in lightning, so definitely, its difficult  create lightning component, please assist.
Hello-

VF Page development , I have to create  2 table which displays list of contacts and list of documents.  when i click on any contact in that list in table 1, it has to dispay list of documents related to it in table 2.  while page load , second table should be shown.Only when  click on any row in table 1, it should show data in table2.

One contact will have many documents (Document is custom object , parent child relation with Contact) .

 
Hi All,

 I have lightning compoent, when i click on some button in that, js controller will call apex method,from there will get details from web service and  come back to component  open as sub tab and there shows all details from web service.(note that this subtab is basically from third party, not salesforce custom tab)

Here for sub tab, will pass the dynamic web service URL.so far so good.

But when component page gets refreshed , sub tab does not show nay data, it is blank.

But it works with classic code, I have gone through classic code, did not get what they might have used to get this functionality, any idea


 
I  have list type attribute in lightning component1.On compoent load, list will get some values from apex method.


Now I have another component.I will click on menu item in the menubar, code as below.
<lightning:buttonMenu alternativeText="Toggle menu" label="Partcipant Info" onselect="{!c.doRedirect}" >
 <lightning:menuItem label="Home Page" value="menuitem1" iconName="utility:table"/>
          <lightning:menuItem label="Account Balance" value="menuitem2" iconName="utility:table" />

</lightning:buttonMenu>

So in doRedirect.js, i need to get compoent1 list type attribute.

Note:Both compoents are on same page.
How to write below peice of code in lightning, please assist.


 System.currentPageReference().getParameters().put('id',theNewContId)


My requirement is, will be on contact detaled page, i have data table which displays list of orders of that contact.

When i click on any row's checkbox in that datatable, it has to get  that particular order details and refrsh the current page and open page ,for this new page, will have to contruct url in lightning same as above.
                   
I have public non static method which will call couple of private methods ,one of them in turn make call to web service.

Now i will have to make them annotated with @AuraEnabled, how can I do that.

I tried making all of them static, it gices an errors

'this cannot be used in static resource'
'variable does not exist: request'

Please suggest
Here I am planning to use the list value from one method to another, but i am getting null value, how can i get it, please suggest ASAP

public class RPC 
{
@AuraEnabled public  static List<Contact> contlist {get;set;} 
@AuraEnabled 
    public static  getContact(Id firstcontId){
        
       
       List <Contact> contlist=[select Id, AccountID, Name, LastName, FirstName, Ind_ID__c,  from Contact LIMIT 5];
    
    }
    
    

@AuraEnabled public static String  getRefreshInfo()
{
   system.debug(contlist);     ---//It gives me null value, how can i get the contlist from getContact and use it here
}


}
I have custom  contact detailed page in lightning, it has data table with Order (custome object )details in it.

As soon as I click on any order row in list of datatable, page should get refreshed and  show selected order deatils  in detiled section page.(I have apex class for this and I have code for this entire process in classic vf page and now rewriting it in lightning component)

All I need is, on row seletion, will have to pass Index of the seleted row and two more field values to the apex method to get this process done.
As soon as I click on checkebox of any row  in the datatable of lightning compoenent, by using onrowselection, below function will get called.

 updateSelectedParticipant : function(component, event, helper) {
        //{!P.Index}','{!P.Ind_Id}' ,'{!P.Ga_Id}
      
       var arrayRow = event.getParam('selectedRows');
        console.log('selected row: ', arrayRow);
        
         var selectedIndex=arrayRow[0].Index;
           console.log('Index :', +selectedIndex);
        
        var selectedrowIndID=arrayRow[0].OrderId_ID;
           console.log('IndID :', +selectedrowIndID);

here, I gave arrayRow[0]  just to check functionality.Now will have to make it dynamic.So instead of 0, will have to get the index of the row whichever user selects,how can I do that, please asssit.
I have created data table, as below. I am getting selectedRows is [object Object] in console when i select any row.

i supposed to get array of selected row.I guess i have done some  mistake in declaration of attributes (columns, data).Please clarify asap.



Component:::


<aura:component controller="ContactTopTen" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="columns" type="List" />
    <aura:attribute name="data" type="Object"  />
     <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    <lightning:datatable aura:id="contactTable"
                         keyField="id"
                         data="{!v.data}"
                         columns="{!v.columns}"
                         hideCheckboxColumn="false"
                         onrowselection="{!c.doSelect}" />
                         
</aura:component>

Controller:
({
    init : function(component, event, helper) {
         component.set('v.columns',[
            {label: 'Account Name', fieldName: 'Name', type: 'text', sortable: true},
              {label: 'Rating', fieldName: 'Rating', type: 'text', sortable: true},
             ]);
             var action=component.get('c.getCon');
             action.setCallback(this, function(response){
             var state=response.getState();
             if(state==='SUCCESS' || state==='DRAFT')
             {
             var responseValue=response.getReturnValue();
             component.set('v.data', responseValue);
             }
             
             });
             $A.enqueueAction(action,false);            
        
    },
             doSelect:function(component, event, helper) {
             alert('Success');
             var selectedRows=event.getParam('selectedRows');
             console.log('selectedRows is : ' +selectedRows);
             }
})

Apex class:
public class ContactTopTen {

    @AuraEnabled
    public static List<Account> getCon(){
        
        List<Account> con=[select Name,Id, Rating from Account Limit 5];
        return con;
    }
}

 
Hey folks, I have requirement pls help me.

I have menu bar with items in it in classic , all the items in it are basically other system tabs.When ii click on them, new sub tab will open and show the information of another system. It works fine in classic.
in VF, sfoce.console.getfocusedsubtabid  & sforce.console.openSubTab is used.

Now I will have to migrate this vf page.Could not do with existing vf code.

So i have started creating lightning component.On click , i have to write controller , referring this below code to do so.


({
02    openTabWithSubtab : function(component, event, helper) {
03        var workspaceAPI = component.find("workspace");
04        workspaceAPI.openTab({
05            url: '/lightning/r/Account/001xx000003DI05AAG/view',
06            focus: true
07        }).then(function(response) {
08            workspaceAPI.openSubtab({
09                parentTabId: response,
10                url: '/lightning/r/Contact/003xx000004Ts30AAC/view',
11                focus: true
12            });
13        })
14        .catch(function(error) {
15            console.log(error);
16        });
17    }
18})




But in my case I am confused what should I pass under workspace.openTab   &  workspaceAPI.openSubtab, bcz I dont have URL and things like that.
 can anyone of you suggest me.



OR can anyone suggest me how to use existing vf code and make it working in lightning, bcz this would be easy task
Hi I have vfpage in salesforce console in classic.

Based on given input, it opens contact  custom detailed page using (sforce.openPrimaryTab ).


Same vf page i have placed in lighting app and trying to call it, but it does not go anywhere.

Please help me any alternative for this.

NOTE:: I want to use same vf page and make it compatible to lightning, dont want to create lightning component for this.
Hi I got to migrate call center app to lightning.So   there are two vf pages.

1) In Home page, Click on "Request " button --> enter request ID --> click on Search
It connects to web service and get the result back in list view.
Click on any record in that list.
New workspace tab will get opened  which is  Customized Case detailed page (VF page) and it contains customized details at end of the page and detailed pages at Top panel.


Now as part of migration, I have migrated customized Home page(VF1) to lightning, created new Lightning Application and placed  this VF1 as Home page in lightning App.
 Then I am able to get the records from webservice and display in list view.So far so good.

While migrating second page ,I got to recreate VF2 as lightning Component as it has  java script which is not supporting in lightning.

I have done the same , able to view as expected in lightning component.

Now all i have to do is, connect these two i.e   Lightning migrated VF1
and Lightning component..

Please anyoneof suggest as early as possible.

 
Hey folks,

Is there any tag to refresh particular section in lightning component from init function every n seconds.
Hi, 
I have customized Home page with VF in classic.
It  contains visualforce tabs.

I migrated to lightning by addind lighting style sheets tags & apex:slds.
Then created new Lightning app and added this vf to Home page of lightning app.

Now the problem is , when i click on the vf tab, it should open the workspace tab , but new window is getting opened.

Please suggest ASAP
Hi , 

I have buttons called "Request search"  on service console, when i click on it ,another vf page opens in browser\tab,
then I will have to enter request ID and search, then it connects to web service and fetch details for me.
--So here,  my query is , how to find out the the "Request search" button is under which object?
-- How to find which VF page is being opened when i click on any button??

Note:: could not find the VF name in URL.
Hi I have Call center app , I got to migrate all the related vf pages to lightning, but when i open console, i could not find out which vf page the console is referring, how to debug it, please help asap.
While migrating classic code to lightning, i have come across below issue.

wsdl2apex based apex class is not being called when i run the code from lighntning, same wokrs in classic, please help asap
Hi

I got to place lightning comp in utility items, but v.recordId is throwing null in 'init' function.same works in cmp framework.

As per one of the forums, I was suggsested to use 'afterRender'. i have tried , somehow i did not get exptected result.

So i have done research, and used 'render' as below.I am able to capture recordId in "onRender".

But when I use this "component.set()" to assign some value  to one of the attributes in "onRender", it is getting called continuosly (more than 100 times)


<aura:handler name="render" value="{!this}" action="{!c.onRender}"/>

Please suggest ASAP
Hey Folks,
Please advice.

I have two objects with master detailed relationship. Contact and its plans.

I have custom field on contact where i have to populate its value as YES if "XYZ" plan is listed for that contact else as "NO"

Please assist the effective way to achieve this.
Hey folks, please help me how to achieve below requirement.

In vf code, when i click on  one column in block table , it has to download  attachment(parent.type = case)   and show  relevant case related details like status, origin in second page block table.


I am able to download when i click on feild, but not able to retrieve data and show in second table.

Note that, second block table should not be visible at all until i click on the attachment.
sforce.console.getEnclosingPrimaryTabId(closeTab);

var closeTab= function closeTab(result){
var a=result.id;
console.log(a) ; 
// in console, i get expected value in classic app
// same code gives null value in lightning
}


I understood somewhat from blogs that this does not support in lightning, am i correct.If yes, can you help me with alternative
I got to migrate the vf page, it has aroung 2-3k lines of code.

Only these liness are not supportable in lightning, so definitely, its difficult  create lightning component, please assist.
Here I am planning to use the list value from one method to another, but i am getting null value, how can i get it, please suggest ASAP

public class RPC 
{
@AuraEnabled public  static List<Contact> contlist {get;set;} 
@AuraEnabled 
    public static  getContact(Id firstcontId){
        
       
       List <Contact> contlist=[select Id, AccountID, Name, LastName, FirstName, Ind_ID__c,  from Contact LIMIT 5];
    
    }
    
    

@AuraEnabled public static String  getRefreshInfo()
{
   system.debug(contlist);     ---//It gives me null value, how can i get the contlist from getContact and use it here
}


}
I have created data table, as below. I am getting selectedRows is [object Object] in console when i select any row.

i supposed to get array of selected row.I guess i have done some  mistake in declaration of attributes (columns, data).Please clarify asap.



Component:::


<aura:component controller="ContactTopTen" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name="columns" type="List" />
    <aura:attribute name="data" type="Object"  />
     <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    <lightning:datatable aura:id="contactTable"
                         keyField="id"
                         data="{!v.data}"
                         columns="{!v.columns}"
                         hideCheckboxColumn="false"
                         onrowselection="{!c.doSelect}" />
                         
</aura:component>

Controller:
({
    init : function(component, event, helper) {
         component.set('v.columns',[
            {label: 'Account Name', fieldName: 'Name', type: 'text', sortable: true},
              {label: 'Rating', fieldName: 'Rating', type: 'text', sortable: true},
             ]);
             var action=component.get('c.getCon');
             action.setCallback(this, function(response){
             var state=response.getState();
             if(state==='SUCCESS' || state==='DRAFT')
             {
             var responseValue=response.getReturnValue();
             component.set('v.data', responseValue);
             }
             
             });
             $A.enqueueAction(action,false);            
        
    },
             doSelect:function(component, event, helper) {
             alert('Success');
             var selectedRows=event.getParam('selectedRows');
             console.log('selectedRows is : ' +selectedRows);
             }
})

Apex class:
public class ContactTopTen {

    @AuraEnabled
    public static List<Account> getCon(){
        
        List<Account> con=[select Name,Id, Rating from Account Limit 5];
        return con;
    }
}

 
Hey folks, I have requirement pls help me.

I have menu bar with items in it in classic , all the items in it are basically other system tabs.When ii click on them, new sub tab will open and show the information of another system. It works fine in classic.
in VF, sfoce.console.getfocusedsubtabid  & sforce.console.openSubTab is used.

Now I will have to migrate this vf page.Could not do with existing vf code.

So i have started creating lightning component.On click , i have to write controller , referring this below code to do so.


({
02    openTabWithSubtab : function(component, event, helper) {
03        var workspaceAPI = component.find("workspace");
04        workspaceAPI.openTab({
05            url: '/lightning/r/Account/001xx000003DI05AAG/view',
06            focus: true
07        }).then(function(response) {
08            workspaceAPI.openSubtab({
09                parentTabId: response,
10                url: '/lightning/r/Contact/003xx000004Ts30AAC/view',
11                focus: true
12            });
13        })
14        .catch(function(error) {
15            console.log(error);
16        });
17    }
18})




But in my case I am confused what should I pass under workspace.openTab   &  workspaceAPI.openSubtab, bcz I dont have URL and things like that.
 can anyone of you suggest me.



OR can anyone suggest me how to use existing vf code and make it working in lightning, bcz this would be easy task
Hi I have vfpage in salesforce console in classic.

Based on given input, it opens contact  custom detailed page using (sforce.openPrimaryTab ).


Same vf page i have placed in lighting app and trying to call it, but it does not go anywhere.

Please help me any alternative for this.

NOTE:: I want to use same vf page and make it compatible to lightning, dont want to create lightning component for this.
Hi I got to migrate call center app to lightning.So   there are two vf pages.

1) In Home page, Click on "Request " button --> enter request ID --> click on Search
It connects to web service and get the result back in list view.
Click on any record in that list.
New workspace tab will get opened  which is  Customized Case detailed page (VF page) and it contains customized details at end of the page and detailed pages at Top panel.


Now as part of migration, I have migrated customized Home page(VF1) to lightning, created new Lightning Application and placed  this VF1 as Home page in lightning App.
 Then I am able to get the records from webservice and display in list view.So far so good.

While migrating second page ,I got to recreate VF2 as lightning Component as it has  java script which is not supporting in lightning.

I have done the same , able to view as expected in lightning component.

Now all i have to do is, connect these two i.e   Lightning migrated VF1
and Lightning component..

Please anyoneof suggest as early as possible.

 
Hi , 

I have buttons called "Request search"  on service console, when i click on it ,another vf page opens in browser\tab,
then I will have to enter request ID and search, then it connects to web service and fetch details for me.
--So here,  my query is , how to find out the the "Request search" button is under which object?
-- How to find which VF page is being opened when i click on any button??

Note:: could not find the VF name in URL.