• Gauri Kasat 8
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 9
    Replies
I am working on a lightning component and within the components layout I have to provide a button which can generate pdf of that lightning component . I found some blogs but still not sure about the actual solution for this . Please let me know if you guys have some sample implementation example for doing this . Thanks !

Hi all,

 

my requirement is the map should get fullscreen after clicking on it.
i have added the vf page containing map in the page layout of the custom object.

Code:

    <body>
        <apex:form >
            <div id="wrapper" >
                <div id="leftcolumn" style="overflow: scroll;  overflow-x: scroll;">
                    <apex:pageBlock id="pb1" title="Route on Map" ><!-- onclick="popupScreen();{return false;}" -->
                        <div id="map" style="width: 480px; height: 400px;"></div>
                    </apex:pageBlock>
                    <div class="slds-scope" > 
                        
                        
                        <div class="slds-grid slds-wrap" > 
                            
                            <div class="slds-size_2-of-9">  
                                <img src="https://chart.googleapis.com/chart?chst=d_map_xpin_letter&chld=pin_star||5AD549|000000|FF0000" style="padding-left:5px;" />
                                
                                <b style="font-size: 12px;color:#E5E4E2;">Start Location,</b>   
                            </div> 
                            
                            
                            <div class="slds-size_2-of-9"> 
                                <img src="https://chart.googleapis.com/chart?chst=d_map_pin_letter_withshadow&chld=|EEEE14|000000" style="padding-left:5px;"/>
                                <b style="font-size: 12px;color:#E5E4E2;">Interval,</b>   
                            </div> 
                            
                            
                            <div class="slds-size_2-of-9"> 
                                <img src="https://chart.googleapis.com/chart?chst=d_map_pin_letter_withshadow&chld=|00BFFF|000000" style="padding-left:5px;"/>
                                <b style="font-size: 12px;color:#E5E4E2;">CheckIn Location,</b>   
                            </div>   
                            
                            <div class="slds-size_2-of-9"> 
                                
                                <img src="https://chart.googleapis.com/chart?chst=d_map_pin_letter_withshadow&chld=|FF0000|000000" style="padding-left:5px;"/>
                                <b style="font-size: 12px;color:#E5E4E2;">Stop Location</b>  
                                
                            </div> 
                        </div>
                    </div>
                </div>
                
      
            
            </div>
            
        </apex:form>
    </body>



Please do help..

Hi All ,
I am facing a problem with enhancelist .
On page load when all data in enhancelist show properly and a scrollbar comes below the enhancelist .
Once I click on any button on the vf page , scroll bar gonna be invisible and it visible for the whole visualforce in below of the browser it mean it create a unnecessary space in righthand side of visualforce page and the data of enhacelist overrides the inline actions(edit,delete) of enhace list.
 
 
Can anyone help me out ?
Hi all;
 
I have a beta managed package and have installed it in a new dev org but there is a problem; some of my Static Resources don't seem to be loading.
 
On my home page I have several VF page links. Those links have an image taken from Static Resources; the images are not loading but the link action is working. 
 
All of my pages and objects are Custom (we are not using any standard objects).
 
 The below is the .css code how it is refrencing
 
.start-btn {
    
    background: url(https://journeytracker-dev-ed--journeytracker.na59.visual.force.com/resource/1536648215000/JourneyTracker__StartMobi?isdtp=p1) no-repeat left top;
    background-size: 100% 100%;    
}

 
I tried the below options also, but it didn't worked.
background: url("{!$Resource.JourneyTracker__StartMobi}") no-repeat;

background: url("{!$Resource.StartMobi}") no-repeat;
 

 


I've looked at the Static Resource files and they are present.
 
The images file attributes are:
MIME type; image/svg+xml
Cache Control; Public
 

 
Any suggestions please.
Hello All,

I have run code scanner tool on my apex class and Visual force page. It give me FLS Create Issues.
I have solved these issues as per mention following URL

https://developer.salesforce.com/page/Testing_CRUD_and_FLS_Enforcement
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_perms_enforcing.htm

Again I have run code scanner tool on my apex class and Visual force page. It gives me again FLS Create Issue.
Let me know, if anything I miss

Following are the sample code:

  public PageReference startJourney(){
        if(test.isRunningTest()){
            valueLat = '18.51870548';
            valueLong = '73.93681982';
            existingAddresses = 'Amanora Town Centre, Amanora Town Centre, Amanora Park Town, Hadapsar, Pune, Maharashtra 411028, India';
        }
        Double lat = Double.valueOf(valueLat);
        System.debug('lat=>'+lat);
        Double lng = Double.valueOf(valueLong);
        System.debug('existingAddresses=>'+existingAddresses);
        System.debug('lng=>'+lng);
        // Create location record to store the Latitude,Longitude and Address
        journeys = [SELECT Id, Name, Journey_Start_Location__c, Date_Time__c, User__c,Address__c,IsActive__c, CreatedDate FROM Journey__c WHERE CreatedDate =TODAY AND IsActive__c=true AND User__c=: userInfo.getUserId()];
        
        System.debug('journeys=>'+journeys);
         Boolean isJourneyInsertable = Schema.sObjectType.Journey__c.fields.Date_Time__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.Address__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.User__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.Journey_Start_Location__Latitude__s.isCreateable() &&Schema.sObjectType.Journey__c.fields.Journey_Start_Location__Longitude__s.isCreateable() &&Schema.sObjectType.Journey__c.fields.IsActive__c.isUpdateable();
         Boolean isLocationInsertable = Schema.sObjectType.Location__c.fields.Journey__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Name__Latitude__s.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Name__Longitude__s.isCreateable() &&Schema.sObjectType.Location__c.fields.Date_Time__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Address__c.isCreateable() &&Schema.sObjectType.Location__c.fields.User__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Type__c.isCreateable();



        if(journeys.isEmpty()){
            jr  = new Journey__c(IsActive__c=true,Date_Time__c = System.now(),Address__c = existingAddresses, User__c=userInfo.getUserId(),Journey_Start_Location__Latitude__s =  lat, Journey_Start_Location__Longitude__s = lng);
            if(isJourneyInsertable){
                insert jr;
            }
            LatLong = new Location__c(Journey__c = jr.id,Location_Name__Latitude__s = lat,Location_Name__Longitude__s = lng,Date_Time__c = System.now(),Address__c = existingAddresses,User__c=userInfo.getUserId(),Location_Type__c='Start Location'); 
            if(isLocationInsertable){
                insert  LatLong;
            }
        }
        return null;
    }




Thanks in Advance
 
 
Hey,
my requirement is to capture location i.e. latitude,longitude and address in lightning component.
How to call following script in lightning?
 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&key=YOUR_KEY" />  

Urgent.. please help
i have created a local action with lightning component to capture the location.
how to call that local action in autolaunch flow?

hello, i have created a local action with lightning component to capture the location.

how to call that local action in autolaunch flow?

How to call geolocation api which in javascript in flows?
Hello,
i have overridden new button of lead object.
My requirement is to add lead object to the related list of the custom object "journey".

I have created a lookup field called Journey id on lead.

I have created a vf page to override new button and create the commandbutton save.
after clicking on the save button it will 1st call to the javascript function which will capture the location and after that save method.
the javascript function capture the location and creates a object for journey. 

in action part of commandbutton i have called the save method.


If anyone have solution please do tell..
In apex:enhancedList, can we keep the Edit/Delete actions towards the right side unlike current position?
Hello..

My requirement is to take location from user say after every 1 hours and the end time is 2 hours.
how to do this?
    

  var initDate = new Date(); // Or get the user login date from an HTML element (i.e. hidden input)
                    var interval;
                    
                    interval = window.setInterval(function() {
                        var now = new Date();
                  
                        if(hours=='' || hours==null || hours ==undefined){
                            getLocations();
                        }else{
                            if(now.getTime() - initDate.getTime() < hours*60*60*1000 && now.getDate() == initDate.getDate()) {
                               
                                getLocations();
                            }
                            else {
                                stopJourney();
                                window.clearInterval(interval);
                                toggleAdjustment();
                                checkInToggle();
                                toggleAdjustment();
                                var element1 = document.getElementById("stopInactive");
                                element1.classList.toggle("clsHide");
                                var element2 = document.getElementById("stop");
                                element2.classList.toggle("clsHide");
                                
                            }
                        }
                    }, intervalInMinutes*60*60*1000);
                });


Note: value of "hours" varaible : 2
value of "intervalInMinutes" : 1
 
As their is wakelock permission in android, do we have this permission or some similiar permission to this in salesforce?
Hi All,
Below is the usecase for salesforce 1 APP.
UseCase :
             Manger want to see his sales peoples location in google map.
             There should be provision for sales users, to allow his location tracking continously.

Please help me on this ,how can i achive the above usecase?
I have to get location whenever we open salesforce mobile app ?
If anyone have solution.. Please do tell
Hello,
If at any point of time the App status becomes from Inactive to Active the salesforce1 app should capture location.
So, How can we determine in vf page that the salesforce1 app has become active?
Hello,

i need to create a batch class which will get latitude and location after specific interval of time. I am doing this because even when salesforce1 app is in inactive state it should get locations.

How to do this? Please help
Hello All,

I have run code scanner tool on my apex class and Visual force page. It give me FLS Create Issues.
I have solved these issues as per mention following URL

https://developer.salesforce.com/page/Testing_CRUD_and_FLS_Enforcement
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_perms_enforcing.htm

Again I have run code scanner tool on my apex class and Visual force page. It gives me again FLS Create Issue.
Let me know, if anything I miss

Following are the sample code:

  public PageReference startJourney(){
        if(test.isRunningTest()){
            valueLat = '18.51870548';
            valueLong = '73.93681982';
            existingAddresses = 'Amanora Town Centre, Amanora Town Centre, Amanora Park Town, Hadapsar, Pune, Maharashtra 411028, India';
        }
        Double lat = Double.valueOf(valueLat);
        System.debug('lat=>'+lat);
        Double lng = Double.valueOf(valueLong);
        System.debug('existingAddresses=>'+existingAddresses);
        System.debug('lng=>'+lng);
        // Create location record to store the Latitude,Longitude and Address
        journeys = [SELECT Id, Name, Journey_Start_Location__c, Date_Time__c, User__c,Address__c,IsActive__c, CreatedDate FROM Journey__c WHERE CreatedDate =TODAY AND IsActive__c=true AND User__c=: userInfo.getUserId()];
        
        System.debug('journeys=>'+journeys);
         Boolean isJourneyInsertable = Schema.sObjectType.Journey__c.fields.Date_Time__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.Address__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.User__c.isCreateable() &&Schema.sObjectType.Journey__c.fields.Journey_Start_Location__Latitude__s.isCreateable() &&Schema.sObjectType.Journey__c.fields.Journey_Start_Location__Longitude__s.isCreateable() &&Schema.sObjectType.Journey__c.fields.IsActive__c.isUpdateable();
         Boolean isLocationInsertable = Schema.sObjectType.Location__c.fields.Journey__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Name__Latitude__s.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Name__Longitude__s.isCreateable() &&Schema.sObjectType.Location__c.fields.Date_Time__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Address__c.isCreateable() &&Schema.sObjectType.Location__c.fields.User__c.isCreateable() &&Schema.sObjectType.Location__c.fields.Location_Type__c.isCreateable();



        if(journeys.isEmpty()){
            jr  = new Journey__c(IsActive__c=true,Date_Time__c = System.now(),Address__c = existingAddresses, User__c=userInfo.getUserId(),Journey_Start_Location__Latitude__s =  lat, Journey_Start_Location__Longitude__s = lng);
            if(isJourneyInsertable){
                insert jr;
            }
            LatLong = new Location__c(Journey__c = jr.id,Location_Name__Latitude__s = lat,Location_Name__Longitude__s = lng,Date_Time__c = System.now(),Address__c = existingAddresses,User__c=userInfo.getUserId(),Location_Type__c='Start Location'); 
            if(isLocationInsertable){
                insert  LatLong;
            }
        }
        return null;
    }




Thanks in Advance
 
Hello,
i have overridden new button of lead object.
My requirement is to add lead object to the related list of the custom object "journey".

I have created a lookup field called Journey id on lead.

I have created a vf page to override new button and create the commandbutton save.
after clicking on the save button it will 1st call to the javascript function which will capture the location and after that save method.
the javascript function capture the location and creates a object for journey. 

in action part of commandbutton i have called the save method.


If anyone have solution please do tell..
Hi All,
Below is the usecase for salesforce 1 APP.
UseCase :
             Manger want to see his sales peoples location in google map.
             There should be provision for sales users, to allow his location tracking continously.

Please help me on this ,how can i achive the above usecase?
I have to get location whenever we open salesforce mobile app ?
If anyone have solution.. Please do tell
Hello,
If at any point of time the App status becomes from Inactive to Active the salesforce1 app should capture location.
So, How can we determine in vf page that the salesforce1 app has become active?