• Ekta Kandera
  • NEWBIE
  • 25 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi Everyone,

This is interesting to know. I want to display my current location on the Google map by using Visualforce page. That can be fetched the longitude and latitude values too.

Thanks,
Rakshana 
Hi friends,

I have a class which is using Territory2 and UserTerritory2Association objects.So i need to cover these lines.Can you please how to insert test data of territory2 and  UserTerritory2Association.

Thanks,
Raj.
Hello. I have the following javascript button I need to convert to a lightning component. I'm running into issues with the Apex class. How do I get the 4 account field values and do the 'if statements'? Once I have those field values, how do I create the Lightning Component controller.js? I've read plenty of articles on this but still can't figure it out, can someone please help me with the acutal code?

Original JavaScript button code - 

var taxID= '{!Account.tax__c}'; 
var accID = '{!Account.Id}'; 
var type = '{!Account.TypeId}'; 
var typeName = '{!Account.TypeName}'; 
if(taxD!=null) 

if(typeName !='Personal'){ 
alert('Post message here.'); 

if(type != '987652930764JKS'){ 
var url= '/apex/VisualForcePage?id=' + accID; 
showSplashView(); 
window.location = url; 

else 

var url= '/apex/VisualForcePage?id=' + accID+'&Personal=true'; 
showSplashView(); 
window.location = url; 


else 

alert('Tax Id required'); 
}

Lightning Component (so far) - 

<aura:component controller="Component_Controller" implements="force:lightningQuickActionWithoutHeader,force:hasRecordId,force:hasSObjectName" access="global">
    <aura:attribute name="tax" type="String"/>
    <aura:attribute name="type" type="String"/>
    <aura:attribute name="typeName" type="String"/>

    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <div class="slds-p-around--x-small slds-align_absolute-center">
           <h2>Post message here.</h2>
    </div>
    <div style="text-align:center">
    <lightning:button label="OK" onclick="{!c.launch}" class="slds-m-bottom-medium"/>
    </div>
</aura:component>

Lightning controller.js (so far) - 

({ 
    doInit : function(cmp) {

        })
    },
    
    launch : function(component, event, helper){
        //on click of "OK", redirect to visualforce page
        
        var urlEvent = $A.get("e.force:navigateToUrl");
        urlEvent.setParams({"url":"/apex/VisualForcePage?id=" + cmp.get("v.recordId") });
        urlEvent.fire();
    } 
})
Hi Everyone,

This is interesting to know. I want to display my current location on the Google map by using Visualforce page. That can be fetched the longitude and latitude values too.

Thanks,
Rakshana 
Hello,
I got this message for the Shift Hours field which I thought would be a simple fomula (Shift_End_Time__c  -  Shift_Start_Time__c). The Return field is Number.

"The 'Shift Hours' field on the 'Volunteer Shift' record is not working as expected."
What did I wrong?

Thanks!