• pkulkarni
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 5
    Replies
  • How lightnig components are re-used?
  • For example, If I have this - http://sfdcmonkey.com/2017/01/07/custom-lookup-lightning-component/ component in my org, and I want same for Opportunity on different lightning component. How can I use that?
  • How can I call generic component in another component with some parameters?
I need to set inbound REST integration in one of my requirement. Whenever we hit Salesforce URL, it should update some info in Salesforce. I am using GET method and passing parameters in URL.

Here is URL I am hitting from POSTMAN - https://peeke-dev-ed.my.salesforce.com/services/apexrest/SFRen/BreakDownCounter?cust=KonarkRegency&build=A&wTank=T1&wLevel=50

But this gives me error - "errorCode": "INVALID_SESSION_ID"  

When I hit URL(/services/apexrest/SFRen/BreakDownCounter?cust=Greenland County Narhe Gaon&build=A&wTank=T1&wLevel=50) from workbench, it updates records successfully. 

My Apex Class is-
@RestResource(urlMapping='/BreakDownCounter/*')
global with sharing class RESTBreakDownController {
    @HttpGet
    global static void updateWaterLevels(){        
        String accntName=RestContext.request.params.get('cust');
        String buildName=RestContext.request.params.get('build');
        String tankName=RestContext.request.params.get('wTank');
        String waterLevel=RestContext.request.params.get('wLevel');
        
        SFRen__Water_Tank__c wTank=[select Id, SFRen__No_of_Times_Emptied_in_a_Day__c , SFRen__Building__c, SFRen__Max_Capacity__c, SFRen__Today_Water_Use__c, SFRen__Current_Water_Level__c, SFRen__Building__r.SFRen__Account__r.Name, SFRen__Building__r.Name from SFRen__Water_Tank__c where SFRen__Building__r.SFRen__Account__r.Name=:accntName and SFRen__Building__r.Name=:buildName and Name=:tankName limit 1];       
        
        if(wTank!=null){
            SFRen__Tank_Level__c level=new SFRen__Tank_Level__c(SFRen__Reading_Time__c=System.now(),SFRen__Water_Level__c=Decimal.valueOf(    waterLevel),SFRen__Water_Tank__c=wTank.Id);       
            insert level;            
        }       
    }   
}

I am not using any authentication. Am I missing anything in the process? Any help would be much appreciated. Thank you in advance.

I have created a trigger.  After insertion of record i want to show message on new page "record added successfuly" and that page should be called from trigger. How to achieve this?

Hello,

 

     I am beginner in Apex. So, Can any one give me brief information of Apex? like its purpose, advantages over other languages etc... 

 

Thanks....!!!

I am using lightning:treegrid to display hierarchy of accounts.
When I select a child from the hierarchy and then collapse its parent and expand again - the selection is gone.

This is also reproducible in the lightning component library
https://developer.salesforce.com/docs/component-library/bundle/lightning:treeGrid/example

Expand/Collapse should not affect any selection.
I need to set inbound REST integration in one of my requirement. Whenever we hit Salesforce URL, it should update some info in Salesforce. I am using GET method and passing parameters in URL.

Here is URL I am hitting from POSTMAN - https://peeke-dev-ed.my.salesforce.com/services/apexrest/SFRen/BreakDownCounter?cust=KonarkRegency&build=A&wTank=T1&wLevel=50

But this gives me error - "errorCode": "INVALID_SESSION_ID"  

When I hit URL(/services/apexrest/SFRen/BreakDownCounter?cust=Greenland County Narhe Gaon&build=A&wTank=T1&wLevel=50) from workbench, it updates records successfully. 

My Apex Class is-
@RestResource(urlMapping='/BreakDownCounter/*')
global with sharing class RESTBreakDownController {
    @HttpGet
    global static void updateWaterLevels(){        
        String accntName=RestContext.request.params.get('cust');
        String buildName=RestContext.request.params.get('build');
        String tankName=RestContext.request.params.get('wTank');
        String waterLevel=RestContext.request.params.get('wLevel');
        
        SFRen__Water_Tank__c wTank=[select Id, SFRen__No_of_Times_Emptied_in_a_Day__c , SFRen__Building__c, SFRen__Max_Capacity__c, SFRen__Today_Water_Use__c, SFRen__Current_Water_Level__c, SFRen__Building__r.SFRen__Account__r.Name, SFRen__Building__r.Name from SFRen__Water_Tank__c where SFRen__Building__r.SFRen__Account__r.Name=:accntName and SFRen__Building__r.Name=:buildName and Name=:tankName limit 1];       
        
        if(wTank!=null){
            SFRen__Tank_Level__c level=new SFRen__Tank_Level__c(SFRen__Reading_Time__c=System.now(),SFRen__Water_Level__c=Decimal.valueOf(    waterLevel),SFRen__Water_Tank__c=wTank.Id);       
            insert level;            
        }       
    }   
}

I am not using any authentication. Am I missing anything in the process? Any help would be much appreciated. Thank you in advance.
Hi,
I create a lightning component for the lightning experience record pages. In the customize record page, I drag standard Record Detail component and my componont to the page. In my component, I update some fields of a record. After I save those field, I fire up the e.force:refreshView event. But the standard record detail component did not refresh to show the new value of those field. Is there any way to force to refresh the standard record detail component?

 

Hello,

 

     I am beginner in Apex. So, Can any one give me brief information of Apex? like its purpose, advantages over other languages etc... 

 

Thanks....!!!