• sfp
  • NEWBIE
  • 20 Points
  • Member since 2014
  • Mr

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 16
    Replies
Hi All,

One year back I have used my salesforce mobile app application the following css files. Currently now available.

<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/styles.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/code.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/icons.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-gizmo/ss-gizmo.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-pika/ss-pika.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-gizmo/ss-gizmo.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-standard/ss-standard.css" />

Now page look and fell is gone. Could you please help this issue, where we will find those files.

Kind Regards,
Mohan.
  • February 26, 2016
  • Like
  • 0
Hi All,

How to upload wav file through REST API In salesforce? Once Http response success need to store in SF object.

Kind Regards,
Mohan
  • January 07, 2016
  • Like
  • 0
Hi All,

How to upload wav file through REST API In salesforce. Once Http response success need to store in SF object.

Kind Regards,
Mohan
  • January 07, 2016
  • Like
  • 0
Hi All,

 I have used apex InputSecret tag in vf page. And assigned object field value, even its showing null value.

<apex:inputSecret value="{!inputValue}" id="theSecretInput"/>

value="" is null one I have open the vf page in browser. 

Please help this issue.

Kind Regards,
Mohan
  • August 25, 2015
  • Like
  • 0
Query Name - SOQL_SOSL_Injection
Severity - Critical
7. public UserController() //usercontroller.cls
...
10. id = apexpages.currentpage().getparameters().get('id');

My code: 

public UserController() {
        try {
            user = new User__c();
            id = apexpages.currentpage().getparameters().get('id');
            if (id != null) {                    
                    user = [SELECT Id, Id__c, FirstName__c, LastName__c, MobilePhone__c, Username__c, Status__c FROM User__c where id =: string.escapeSingleQuotes(id)];
            }
        } catch(QueryException e) {
            ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Invalid User: '+id);
            ApexPages.addMessage(msg);
        }
    }

Please help out this issue. 

Thanks,
Mohan

 
  • August 20, 2015
  • Like
  • 0
Hi All,

 In my Visual force page, I have selected 10 records, I have process in apex class, in between 5th records is having some exception. Its not procesing below records. Please help out this issue. 

try {
            for(User user: selectedUsers) {                        
                User__c pbxUser = new User__c();
                
                if (user.FirstName.length() > 32) {
                    pbxUser.FirstName__c = user.FirstName.substring(0, 32); //(String) user.get('FirstName');
                } else {
                    pbxUser.FirstName__c = user.FirstName;
                }
                
                if (user.LastName.length() > 32) {
                    pbxUser.LastName__c = user.LastName.substring(0, 32); //(String) user.get('LastName');
                } else {
                    pbxUser.LastName__c = user.LastName;    
                }
                if (user.Username.length() > 64) {
                    pbxUser.Username__c = user.Username.right(64);
                } else {                
                    pbxUser.Username__c = user.Username; //(String) user.get('Username');
                }
                
                pbxUser.User__c = user.Id; //(String) user.get('Id');
                String mobilePhone = user.MobilePhone; //(String) user.get('MobilePhone');
                if(mobilePhone == null) {
                    pbxUser.MobilePhone__c = '0000'; 
                } else {
                    if (mobilePhone.length() > 24) {                    
                        pbxUser.MobilePhone__c = mobilePhone.substring(0, 24);
                    } else {
                        pbxUser.MobilePhone__c = mobilePhone;
                    }    
                }
                pbxUser.Status__c = 'ACTIVE';
                //system.debug(pbxUser);
                pbxUsers.add(pbxUser);
            }        
            addUsers(pbxUsers);
            sfUserList=null; // we need this line if we performed a write operation  because getUsers gets a fresh list now
            
        } catch (Exception e) {
            ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, e.getMessage());           
            ApexPages.addMessage(msg);
                        
        }     
 
  • August 12, 2015
  • Like
  • 0
Code : 
When ever its adding a new User the Id value null and edit time passing the value query string. 

public UserController() {
        
        id =  apexpages.currentpage().getparameters().get('id');
                
        if (id != null) {
            id = string.escapeSingleQuotes(id);
            user = new User__c();    
            try {                                
                user = [SELECT Id, Id__c, FirstName__c, LastName__c, MobilePhone__c, Username__c, Status__c FROM User__c where id =: id];
                
            } catch(QueryException e) {
                ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Invalid User: '+id);
                ApexPages.addMessage(msg);
            }
        }
    }

Please suggest

Kind Regards,
Mohan
  • August 07, 2015
  • Like
  • 0
Hi All,

Query Name - Queries_With_No_Where_Or_Limit_Clause
Severity - Warning
17. public void loadUserList() //userlistcontroller.cls
18. total_size = [SELECT count() FROM User__c];

Please help out this issue.

Kind Regards,
Mohan
  • August 07, 2015
  • Like
  • 0
Hi All,

 Could please post sample code, how to pass checkbox user object data and update into another custom object those values. 

  Using in pageBlockTable data. 
Kind Regards,
Mohan
  • July 30, 2015
  • Like
  • 0
pageReference pg = new pagereference('/apex/UserList?sfdc.tabName=UserList');            
         pg.setRedirect(true);  
         return pg;    
  • July 24, 2015
  • Like
  • 0
Hi All,

 I have click on the commandButton, in salesforce1 app foucs will go to the next outputpanel.

 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Testing" for="AccountLeadContact" />
                    <apex:commandButton status="saving" value="Assign..." onclick="return addAssign();" />
 </apex:pageBlockSectionItem>

Click on addAssign() method.
<div id="divid">
        <apex:outputpanel id="searchrender" >
         <apex:pageBlockSection title="Who do you want to assign this call record to..." >
                <apex:pageBlockSectionItem >
                       <apex:outputLabel id="Search">Search</apex:outputLabel>
                       <apex:panelGroup >                       
                       <apex:inputText id="searchText" style="size:10px;" value="{!searchText}" />&nbsp;&nbsp;
                        <apex:commandButton value="Go!" action="{!doSearch}" rerender="userresults" status="status"/>
                       </apex:panelGroup>
                </apex:pageBlockSectionItem>

  function addAssign() {
    $('#divid').toggle();
    $('#searchText').focus();
    $(function () {
      alert('test');
      $("#searchText").attr('tabindex', -1).focus();
    });
    
    return false;
}
 
Please help this issue.


 



 
  • November 11, 2014
  • Like
  • 0
Hi All,

 Please help, this issue, I was working Jplayer audio should play in Android phones in salesforce1 app. Its working perfectly in IPAD and Iphone in salesforce1 app. Its not working in android salesforce1 app jplayer audio file auto play and ended event.

var ended_{!tid} = false;
      var waitForProgress = true;
  var myCirclePlayer_{!tid} = new CirclePlayer("#jquery_jplayer_1_{!tid}",{
               mp3: "{!JSENCODE(FileUrl)}"
        },                    
        {        
            cssSelectorAncestor: "#cp_container_1_{!tid}",
            loadeddata: function(){
              if($.jPlayer.platform.android) {
                    alert("android loaded");
                    $("#jquery_jplayer_1_{!tid}").jPlayer("playHead",1);
                }
            },
            setmedia: function() {
                  $("#jquery_jplayer_1_{!tid}").data('jPlayer').androidFix.setMedia = false;
                  alert("android setmedia");
            },            
            progress: function() {
              if(waitForProgress && $.jPlayer.platform.android) {
                 //alert('android');
                 waitForProgress = true;
                 //ShowTimer();
                 $("#jquery_jplayer_1_{!tid}").jPlayer("play");                
              }
            },                    
            canplay: function() {
                    //setInterval(8000);
                 if(waitForProgress && $.jPlayer.platform.android) {
                     //alert('android');
                     waitForProgress = false;
                     //ShowTimer();
                     $("#jquery_jplayer_1_{!tid}").jPlayer("play");                
                 }else{                    
                  $("#jquery_jplayer_1_{!tid}").jPlayer("play");
                 }
            },
            play : function() {                  
                 // $("#jquery_jplayer_1_{!tid}").jPlayer("play");
            },                        
            ended: function () {
                if($.jPlayer.platform.android) {
                    alert("android ended");
                    ended_{!tid} = true;
                    $("#jquery_jplayer_1_{!tid}").jPlayer("playHead",0);
                } else {  
                    alert("ios ended");              
                   ended_{!tid} = true;
                }
            },
            swfPath: "{!URLFOR($Resource.jplayermob, 'Jplayer.swf')}",
            //swfPath: "http://jplayer.org/js",
            solution: "flash, html",
             supplied: "mp3, m4a",             
            wmode: "window",
            size : { width:"40px" },
            autoplay: true                
        });
 
<div id="jquery_jplayer_1_{!tid}"></div>
 <div class="prototype-wrapper"> <!-- A wrapper to emulate use in a webpage and center align -->                           
                        <!-- The container for the interface can go where you want to display it. Show and hide it as you need.     -->            
                        <div id="cp_container_1_{!tid}">                            
                            <ul class="cp-controls">
                                <li><a class="cp-play" id="aplay_{!tid}" onclick="end_play_{!tid}();" tabindex="1">play</a></li>
                                <li><a class="cp-pause" id="apause_{!tid}" style="display:none;" tabindex="1">pause</a></li> <!-- Needs the inline style here, or jQuery.show() uses display:inline instead of display:block -->
                            </ul>
                        </div>
       </div>




 
  • October 29, 2014
  • Like
  • 0
I have displayed Activity List in salesforce1 vf page. Click on one activity subject it will open to details page. 

 sforce.one.navigateToURL('/apex/DetailsMobile?tid='+tid);

 In Command Button Action  Rerender, outpupanel javascript function like this.

 function test(tid){ 
    sforce.one.navigateToURL('/apex/DetailsMobile?tid='+tid);
}

First time refreshing the page, again doing command button action that time not refreshing.

 Please help out this issue?

Thanks
  • September 24, 2014
  • Like
  • 0
Hi All,

 Please help out, how to bulid salesforce1 app using aura framework? If any example please send those details.

Thanks
  • September 08, 2014
  • Like
  • 0
Hi All I have submited the sorce code scanner checkmark. I am getting the following error in my code please suggest me.

Our code:

public static void insertAsSystem(sObject obj){ insert obj; }
public static void updateAsSystem(sObject obj){ update obj; }
public static void upsertAsSystem(sObject obj){ upsert obj; }
public static void deleteAsSystem(sObject obj){ delete obj; }

CheckMark Scanner:
Query Name - Bulkify_Apex_Methods_Using_Collections_In_Methods
Severity - Warning
46. public static void insertAsSystem(sObject obj) insert obj; }

Thanks
  • June 20, 2014
  • Like
  • 0
Hello All,

 I have created new spring 14 developer account using partner portal. I have not seen search box in header place near to Salesforce Logo.

  User-added image

 In free developer account i have seen that search box in and pin the tabs in mobile app. Please suggest me this issue.

 User-added image

 
Thanks,
  • June 09, 2014
  • Like
  • 0
Hi All,

 In OAuth Connecated Apps records which object it will refered.

 User-added image

In User Profile that record is added. Please let me know the object name for those OAuth Connected Apps.

Thanks.
  • May 01, 2014
  • Like
  • 0
Hi All

I have converted seconds to Minutes. How to format single digit to 01 like that.

{!IF(FLOOR(MOD(t.CallDurationInSeconds,3600)/60)==0,'00',FLOOR(MOD(t.CallDurationInSeconds,3600)/60))}

how to format Minutes in single digit like 6 to 06.

Thanks
  • April 30, 2014
  • Like
  • 0
Hi All,

In Activity Record CreatedDate in 9:16 AM. Its storing in database 9:16. In Activity default layout Created date added 1 hour and its showing.

 If our custom apex code featching all the Activities. It's displayed still 9:16.  How we will display with logged in user timezone.?

  <apex:outputText value="{0,date,dd/MM/yyyy HH:mm:ss}">
                   <apex:param value="{!t.CreatedDate}" />
   </apex:outputText>

Please help this issue.

Thanks
  • April 29, 2014
  • Like
  • 0
Hi All,

One year back I have used my salesforce mobile app application the following css files. Currently now available.

<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/styles.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/code.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/icons.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-gizmo/ss-gizmo.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-pika/ss-pika.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-gizmo/ss-gizmo.css" />
<apex:stylesheet value="//sfdc-styleguide.herokuapp.com/fonts/ss-standard/ss-standard.css" />

Now page look and fell is gone. Could you please help this issue, where we will find those files.

Kind Regards,
Mohan.
  • February 26, 2016
  • Like
  • 0
Hi All,

 I have used apex InputSecret tag in vf page. And assigned object field value, even its showing null value.

<apex:inputSecret value="{!inputValue}" id="theSecretInput"/>

value="" is null one I have open the vf page in browser. 

Please help this issue.

Kind Regards,
Mohan
  • August 25, 2015
  • Like
  • 0
Hello Gurus,

I am calling a controller method from VF page.And, i need to pass 'chartYear' parameter from the user input as a parameter to my controller method (loadOpps) from the script.  I am new to this and i believe there is something big i am missing. Request you please guide me.
 
<apex:page controller="GoogleChartsController" sidebar="false"> 
    <!-- Google API inclusion -->
    <apex:includeScript id="a" value="https://www.google.com/jsapi" />
     
    <apex:sectionHeader title="Google Charts + Javascript Remoting" subtitle="Demoing - Opportunities by Exepected Revenue"/>
    
    <apex:form id="form" html-oninput="out.value = document.getElementById('page:form:pbblk:sct2:range').value">
    <apex:selectcheckboxes value="{!chartYear}" >
                    <apex:selectOptions value="{!chartYearOptions}" />
                    <apex:actionSupport event="onchange" reRender="chartBlock"/>
                </apex:selectcheckboxes> 
            <apex:outputText value="Stage: "/>
            </apex:form>
 
    <!-- Google Charts will be drawn in this DIV -->
    <div id="chartBlock" style="width: 900px; height: 500px;" />
     
    <script type="text/javascript">
        // Load the Visualization API and the piechart package.
        google.load('visualization', '1.0', {'packages':['corechart']});
       
        // Set a callback to run when the Google Visualization API is loaded.
        google.setOnLoadCallback(initCharts);
   
        function initCharts() {         
          // Following the usual Remoting syntax
          // [<namespace>.]<controller>.<method>([params...,] <callbackFunction>(result, event) {...}
          // controller : GoogleChartsController
          // method : loadOpps
          GoogleChartsController.loadOpps( 
                 function(result, event){  
                     // load Column chart
                     var visualization = new google.visualization.PieChart(document.getElementById('chartBlock'));
                     // Prepare table model for chart with columns
                     var data = new google.visualization.DataTable();
                     data.addColumn('string', 'Opportunity');
                     data.addColumn('number', 'Expected Revenue');
                     data.addColumn('number', 'Amount');    
                     // add rows from the remoting results
                     for(var i =0; i<result.length;i++){
                        var r = result[i];
                        data.addRow([r.Name, r.ExpectedRevenue, r.Amount]); 
                      }
                      
                      var options = {
          title: 'Opportunity Details',
          legend : {position: 'top', textStyle: {color: 'blue', fontSize: 10}}, 
          width:window.innerWidth,
          is3D: true,
        };
                    // all done, lets draw the chart with some options to make it look nice.
                   // visualization.draw(data, {legend : {position: 'top', textStyle: {color: 'blue', fontSize: 10}}, width:window.innerWidth,vAxis:{textStyle:{fontSize: 10}},hAxis:{textStyle:{fontSize: 10},showTextEvery:1,slantedText:false}});
                   visualization.draw(data,options );
              }, {escape:true});
          } 
    </script>
</apex:page>

 
Code : 
When ever its adding a new User the Id value null and edit time passing the value query string. 

public UserController() {
        
        id =  apexpages.currentpage().getparameters().get('id');
                
        if (id != null) {
            id = string.escapeSingleQuotes(id);
            user = new User__c();    
            try {                                
                user = [SELECT Id, Id__c, FirstName__c, LastName__c, MobilePhone__c, Username__c, Status__c FROM User__c where id =: id];
                
            } catch(QueryException e) {
                ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Invalid User: '+id);
                ApexPages.addMessage(msg);
            }
        }
    }

Please suggest

Kind Regards,
Mohan
  • August 07, 2015
  • Like
  • 0
I have some VF pages working properly in web version , but not on salesforce1 app.
I need a solution that how can i common design of VF that will work for both salesforce1 and web version also
Hi All,

Query Name - Queries_With_No_Where_Or_Limit_Clause
Severity - Warning
17. public void loadUserList() //userlistcontroller.cls
18. total_size = [SELECT count() FROM User__c];

Please help out this issue.

Kind Regards,
Mohan
  • August 07, 2015
  • Like
  • 0
Hi All,

 Could please post sample code, how to pass checkbox user object data and update into another custom object those values. 

  Using in pageBlockTable data. 
Kind Regards,
Mohan
  • July 30, 2015
  • Like
  • 0
pageReference pg = new pagereference('/apex/UserList?sfdc.tabName=UserList');            
         pg.setRedirect(true);  
         return pg;    
  • July 24, 2015
  • Like
  • 0
Hi All,

 Please help, this issue, I was working Jplayer audio should play in Android phones in salesforce1 app. Its working perfectly in IPAD and Iphone in salesforce1 app. Its not working in android salesforce1 app jplayer audio file auto play and ended event.

var ended_{!tid} = false;
      var waitForProgress = true;
  var myCirclePlayer_{!tid} = new CirclePlayer("#jquery_jplayer_1_{!tid}",{
               mp3: "{!JSENCODE(FileUrl)}"
        },                    
        {        
            cssSelectorAncestor: "#cp_container_1_{!tid}",
            loadeddata: function(){
              if($.jPlayer.platform.android) {
                    alert("android loaded");
                    $("#jquery_jplayer_1_{!tid}").jPlayer("playHead",1);
                }
            },
            setmedia: function() {
                  $("#jquery_jplayer_1_{!tid}").data('jPlayer').androidFix.setMedia = false;
                  alert("android setmedia");
            },            
            progress: function() {
              if(waitForProgress && $.jPlayer.platform.android) {
                 //alert('android');
                 waitForProgress = true;
                 //ShowTimer();
                 $("#jquery_jplayer_1_{!tid}").jPlayer("play");                
              }
            },                    
            canplay: function() {
                    //setInterval(8000);
                 if(waitForProgress && $.jPlayer.platform.android) {
                     //alert('android');
                     waitForProgress = false;
                     //ShowTimer();
                     $("#jquery_jplayer_1_{!tid}").jPlayer("play");                
                 }else{                    
                  $("#jquery_jplayer_1_{!tid}").jPlayer("play");
                 }
            },
            play : function() {                  
                 // $("#jquery_jplayer_1_{!tid}").jPlayer("play");
            },                        
            ended: function () {
                if($.jPlayer.platform.android) {
                    alert("android ended");
                    ended_{!tid} = true;
                    $("#jquery_jplayer_1_{!tid}").jPlayer("playHead",0);
                } else {  
                    alert("ios ended");              
                   ended_{!tid} = true;
                }
            },
            swfPath: "{!URLFOR($Resource.jplayermob, 'Jplayer.swf')}",
            //swfPath: "http://jplayer.org/js",
            solution: "flash, html",
             supplied: "mp3, m4a",             
            wmode: "window",
            size : { width:"40px" },
            autoplay: true                
        });
 
<div id="jquery_jplayer_1_{!tid}"></div>
 <div class="prototype-wrapper"> <!-- A wrapper to emulate use in a webpage and center align -->                           
                        <!-- The container for the interface can go where you want to display it. Show and hide it as you need.     -->            
                        <div id="cp_container_1_{!tid}">                            
                            <ul class="cp-controls">
                                <li><a class="cp-play" id="aplay_{!tid}" onclick="end_play_{!tid}();" tabindex="1">play</a></li>
                                <li><a class="cp-pause" id="apause_{!tid}" style="display:none;" tabindex="1">pause</a></li> <!-- Needs the inline style here, or jQuery.show() uses display:inline instead of display:block -->
                            </ul>
                        </div>
       </div>




 
  • October 29, 2014
  • Like
  • 0
Hi All,

 In OAuth Connecated Apps records which object it will refered.

 User-added image

In User Profile that record is added. Please let me know the object name for those OAuth Connected Apps.

Thanks.
  • May 01, 2014
  • Like
  • 0
By default, the focus is set to the first available inputField. In my case, the first input is a date field. Every time I go to the page, the focus is set to that field and the calendar pops up, covering items below it.

How do I remove the auto-focus? screenshot: