• SMARTIE
  • 887 Points
  • Member since 

  • Chatter
    Feed
  • 28
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 440
    Replies
Hello all, 

 I have date with (dd-mmm-yy) ex: 20-may-17, in Excel sheet with text type , i need to update this date format  and load in salesforce. can anyone suggest me how to convert it proper date format in salesforce.
  
its bit urgenet requrement.
Thanks 
Vijendahr
) Query all contact records (limit 1000), and show using jquery table as below example:
http://datatables.net/examples/basic_init/themes.html

2) Make first name as clickable, and on click show the record information in editable format in a jquery popup dialog box like below example:
http://jqueryui.com/dialog/#modal-form

3) Contact must be saved using this dialog along with Photo Upload option. That photo must be saved in attachment for that contact and must be visible when the dialog box open for that record.

in this scenario i have done upto 2nd point and in 3rd point photo is being uploaded successfully bt i am not able to show photo in popup box when i open it again after photo upload
  • May 30, 2017
  • Like
  • 0
Hello,

I have below deployment error for deployment of page layout from one sandbox to another

User-added image

thanks for suggestions

 
Test class ............please write.............
 public class NewRoadButtonController 
{
         public id currentRecordId{get;set;}
         public event ev{get;set;}
         public Boolean Car{get;set;}
         Private List<Event> eventList;
         public NewRoadButtonController(ApexPages.StandardController controller)
            {
               this.currentRecordId=controller.getRecord().Id;
            }

        public pagereference newRoadSafetyPage()
            {
                eventList=[select Travelling_by_Car__c,id,Subject,StartDateTime,Today_Date__c from Event where id=:ApexPages.currentPage().getParameters().get('id') LIMIT 1];
                if(eventList.size()!=0)
                {
                    if(eventList[0].Travelling_by_Car__c)
                    {
                        Road_Safety__c objrs = new Road_Safety__c();
                        objrs.Originating_Event_ID__c=eventList[0].id;
                        objrs.Originating_Event_Name__c=eventList[0].Subject;
                        objrs.Road_Safety_Check_Name__c=eventList[0].Subject+'-'+eventList[0].Today_Date__c;
                        objrs.IsChecked__c=true;
                        insert objrs;
        
                        Event eventOld = new Event();
                        eventOld.Id = ApexPages.currentPage().getParameters().get('id');
                        eventOld.Road_Safety_Check__c = objrs.Id;
                        Update eventOld; 
             
                        PageReference requestPage = new pagereference('/'+ objrs.id + '/e');
                        return requestPage;
                    }
                    else
                    {
                        PageReference pa=new pageReference('/apex/ErrorPage');
                        return pa;
                    }
                 
               }
               return null;
            }
}

============================================

global class RoadsafetyEventNotificationBatchSchedule implements Schedulable 
{
        global void execute(SchedulableContext sc) 
    {
        RoadsafetyEventNotificationBatch batch=new RoadsafetyEventNotificationBatch();
        Database.executeBatch(batch);  
    }
    public static void scheduler()
    {
      RoadsafetyEventNotificationBatchSchedule m = new RoadsafetyEventNotificationBatchSchedule();
      String sch ='0 0 * * * ?';
      String jobID1 = system.schedule('Push Notification Job1', sch, m);
      String sch1 ='0 5 * * * ?';
      String jobID2 = system.schedule('Push Notification Job2', sch1, m);
      String sch2 ='0 10 * * * ?';
      String jobID3 = system.schedule('Push Notification Job3', sch2, m);
      String sch3 ='0 15 * * * ?';
      String jobID4 = system.schedule('Push Notification Job4', sch3, m);
      String sch4 ='0 20 * * * ?';
      String jobID5 = system.schedule('Push Notification Job5', sch4, m);
      String sch5 ='0 25 * * * ?';
      String jobID6 = system.schedule('Push Notification Job6', sch5, m);
      String sch6 ='0 30 * * * ?';
      String jobID7 = system.schedule('Push Notification Job7', sch6, m);
      String sch7 ='0 35 * * * ?';
      String jobID8 = system.schedule('Push Notification Job8', sch7, m);
      String sch8 ='0 40 * * * ?';
      String jobID9 = system.schedule('Push Notification Job9', sch8, m);
      String sch9 ='0 45 * * * ?';
      String jobID10 = system.schedule('Push Notification Job10', sch9, m);
      String sch10 ='0 50 * * * ?';
      String jobID11 = system.schedule('Push Notification Job11', sch10, m);
      String sch11 ='0 55 * * * ?';
      String jobID12 = system.schedule('Push Notification Job12', sch11, m);
    
    }




Thanks in advance
Hello Everyone,  I am new Here
I would like to retrive a parent child hierarchy.

I have 4 accounts.

Account1
      |_____>Account 2
                          |_____>Account 3
                                             |_______>Account 4

I want to retrive this parent child hierarchy by using query.

How to do??
Thanks in advance
 
All,
I currently have a ClientBilling object that is the child of the parent ClientCase (MasterDetail).  I have a visualforce page that creates an invoice from a Detail Page Button for the clientcase, pulling all clientbilling entries for a given clientcase. 

I'm wondering how I might go about creating multiple clientcase invoices from a button or tab.  For example, in visual force create invoices for ALL clientcases with status field marked "active."  What would the SOQL look like in this case (pulling all billing items for clientcases with active status)?  Also can someone given an example of how I might do the nested loop in my visual force (looping through clientcases and then looping through billing item of each clientcase)?

If anyone can get me started I woudl be most grateful!

Best,
Collen
Hi,

Is there any way that I can insert record using a visaulforce page, but not using any controller.

To be even more clear - I have my custum page which looks like the standard record create page (say any object), from here I have to insert new records which should complete the insertion just with the vf page.

Thanks,
Leafen.
Hi everyone!

I just started with Salesforce but now I'm facing a problems that I have yet to find a solution for. Here 's the problem:

Now, when a user log in with an external website, say google or outlook (or even facebook, twitter, linkedin if possible), his profile data (name, avatar, contact, ...) in salesforce will be that in the external website, the user no longer need to input his information to salesforce profile.

Then, when the user changes his profile data in the external website, his salesforce profile data will automatically sync with his salesforce profile, and the other way around.
 
Hi 
I have custom object and the related list is Notes and attachments..i have to write trigger on Notes to capture the latest notes to the custom field?
Please let me know if this is possibe...
Hello Experts,
I want to learn new in salesforce like Custom setting, Field Set or the thing which is dynamically and frequently used in salesforce project.
Actuclly my team manager is on busy in some work, and i have one week time so please suggest me some topics which will be useful in my project.
Thanks.

Hi fellas

I have plenty of records of Contacts with custom rich text area field that contains simple text with html tags for bolding. Any suggestions how to fix this, I don't want to see any html tags. How can update all records to remove html tag and make text bolded..
 

thanks

The requirement that I have been given is to display a Popup Window when user presses the New button to create an Opportunity. Then depending on the answer redirect to a different page.

I tried to do create a "new" New Opportunity button but can not replace on the Home Opportunity List View. What is the best approach for this?

We are using Salesforce Classic.

Thanks in advance,

Robert
Hi All

I need to connect and external app to SalesForce. In the documentation it says
--------------
Use the following steps to create a new connected app.
From Setup, enter Apps in the Quick Find box, then select Apps and click New in the Connected Apps section of the page to start defining a connected app.
--------

Can somebody please tell me how to get to "New" in the Connected Apps section because I only have
 Connected Apps OAuth Usage (and)
 Manage Connected Apps
and none of them has a "New" button

Thanks
I want to know if this is possible in salesforce.Lets say i have an formula field and validation rule in account object. 
I want to know if based on certain condition i can modify another field inside the formula field or validation rule.
Like if (name=='drug')
 isValidRecord=false;
If user enters name as drug on account object,then on insertion the isValidRecord checkbox should be checked using validation rule or formula field.Is it possible using these?
Thanks and Regards,
Shiva RV
 
Hi All,
In my org I have 1L Accounts in account I have custom field account__c every day I need to display total amount for all account when my batch job runs (For exam  I am working in banking domino every day amount (amount__c) is updating when my batch job runs for all accounts .
Thanks In Advance 
Regards,
Rajesh
 
Hello -

In this module it tells me to:

When you signed up for Trailhead, a TP was automatically created for you. Scroll to the bottom of this page and click Launch your hands-on org to open your TP.

When I scroll to the bottom of the page, I don't see an option to Launch Your Hands-On Org.  I also don't see it anywhere else on the page.  How do I launch it so I can continue with the module?
 
i have a problrm in thisb unit:-
User-added image Challenge Not yet complete... here's what's wrong: 
The 'Trailhead_Data_Manager' app was not found. Please follow the requirements and ensure the wave enabled org is setup correctly.
I want to access Default Organization Level Value for one of the field on custom setting on Lightning component. I know we can access it on visualforce using  $Setup global variable, but I dont see anything mentioned in documentation for the lightning. I know we can access it using Apex side controller.But before going for that approach I want to make sure if we can access it directly using global variable.
Here's the error message: Challenge Not yet complete... here's what's wrong: 
The field 'Street_Address__c' either does not exists on the Property__c object or it is not of type textarea." 
and here's my entry: 
pictureof Field Added
as you can see, the field name is correct, the field type is correct, and the "always require..." box is checked.  

What's wrong? 
I tried in my DE in Lightning, Classic, and followed the install package article directions opening an icognito window. Still cannot get the package to show or install? Anybody know what the issue is? Thank you!
Hi,
I'm new with Apex, can you help me and modify this piece of code to share Opportunity with products instead of Contact record via S2S?
 
Here is basic code snippet to share a contact record via S2S programmatically.

PartnerNetworkRecordConnection newConnection =
                    new PartnerNetworkRecordConnection(
                        ConnectionId = networkId,
                        LocalRecordId = newContact.Id,
                        SendClosedTasks = false,
                        SendOpenTasks = false,
                        SendEmails = false,
                        ParentRecordId = newContact.AccountId);
insert newConnection;

 
Hello everyone, 

As the title implies, I am trying to create a workflow or a process builder or even an APEX trigger in order to send an automatic email to the Primary Contact of every closed won or closed lost opportunity, but I find no way to do it, every time i reach a step within this process, the next step is impossible to do

Thank you for your future answers, I hope someone can help us !
Hi All,

I have defined some pick values on campaign object and when I create campaign manually I am forced to use only the defined pick values. But i have seen record where some values do not match the defined pick values. Are there records created using data loader? I created a record using data loader and found we can insert values which are not part of pick values/own values. In that case how to restrict this like while creating it should be validated the values getting inserted with the pick values and for a mismatch, it should error out. Can anyone please suggest?

Thanks!!!

 
Hi All,

I want to know that how can we call apex controller method using visualforce javascript in lightning.
Is "sforce.apex.execute" method support in lightning, if not then what else we can do?

Thanks,
Parteek
I am trying to retrieve the administrative permissions of profile as metadata, I am not getting the below mentioned permissions.
  1. Manage External Users and
  2. Use Case Feed.

Is there any way to retrieve it?

Thanks
Karthi
Hi folks,

  Is there any way to show all users Events and tasks in one SF calender ?
I know for that we need to create one VF page..and show all events.but we can use static resource for custom calender?
Please help how we can achieve this?
Hi,
I have created a screen using a visual force page. The screen contains two images that lead to two separate screens, add inventory and view inventory. I am having a problem because when I click the two separate buttons I want it to pull up the records from an inventory record, however it is not working. I am confused because when I use the visualforce page for the view inventory button it works and it matches up with the inventory record list but not when it is accessed through the original screen. How do I reference a unique id in a url so that I can press the image on the original screen and have the add inventory and view inventory screen pull up information that is unique to the selected record? I have attached the code I used below, I believe the problem lies in lines 3 and 7. Thank you.
 
<apex:page standardController="Sol_sence_Products__c" recordSetVar="Sol_sence_Products__c">
<apex:form > 
<apex:outputLink value="https://cs30.salesforce.com/a6D/e?CF00N3100000GottZ={Sol_Sence_Products__c}">
<apex:image url="{!$Resource.Add_Inventory_Button}" width="400" height="400"/>
</apex:outputLink>
    <apex:outputLink value="c.cs30.visual.force.com/apex/PracticeInventoryv6?core.apexpages.request.devconsole={sol_sence_Products__c.ID">
<apex:image url="{!$Resource.View_Inventory_Button}" width="400" height="400"/>
</apex:outputLink>
       
    <a href="history.back();" onclick="history.back();">Back To Previous Screen </a>
</apex:form>
</apex:page>

 
Hello Developers,

I am trying to delete report using metadata API. My code is working fine in one org.But when I move my code into client;s ORg.It did not work.
I checked my debug  logs and found this error messaage. "message=In field: members - no Report named Custom_Folder/Report1 found".
Custom_Folder is the folder developer name and Report1is the report developer name.They both exist in my org.
I also checked the permission of folder. I have given Read/Write access to folder. But Still metadata API cound not read the Report.
Is the issue related to permissions or is there any other  thing going wrong?

I am in urgent need . Please help me.


Thanks,
Shweta

 
Hi,

I want know if is possible separate the css, javascript in differents files and call then in HTML visualforce page? is it possible?

Best Regards
Rafael.

Hello. In the User-Agent OAuth  flow --> a access token and refresh token are returned . How can I store refresh token in a secure fashion (I mean if the phone is rooted then the attacker can keep on using refresh token to gain unlimited access). 

 https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm 

How to hide fields based on picklist value selected in vf. Here is my code
 <apex:pageBlockSection title=" Section"  collapsible="true"/>
               <apex:outputPanel > 
               <table class="tg" style=" width: 100%">
                 <thead></thead>
                 <tbody>
                     <tr>                                                                  
                        <td align="right">Number :&nbsp;&nbsp;</td>
                        <td align="left">
                        <apex:inputField required="true" value="{!OBJ.Round__c}"   /></td>                       
                        <td align="right">Call Person Name :&nbsp;&nbsp;</td>
                        <td align="left"><apex:inputField required="true" value="{!OBJ.Call_Center_Person_Name__c}"/></td>                                    
                     </tr>
                     <tr>                                           
                         <td align="right">Cart Status :&nbsp;&nbsp;</td>
                         <td align="left"><apex:inputField required="true" value="{!bandhanOBJ.Cart_Status__c}"/></td>  
                         <td align="right">Order Date:&nbsp;&nbsp;</td>
                         <td align="left"><apex:inputField value="{!bandhanOBJ.Order_Date__c}"/></td>                                 
                     </tr>                   
                 </tbody>
             </table>
          </apex:outputPanel>        
          <apex:outputPanel id='panel1'>
         <apex:inputfield value=  />
          </apex:outputpanel>
          <apex:outputPanel id='panel2'>
          <apex:inputfield value= />
          </apex:outputpanel>
In the above code based on cart staus picklist value I want to hide panel1 and panel2. Please help me how we can achieve this.
Thanks in Advance
Hi Expect,

Could You Please advise me ! Why pagination is not working in wrapper class. I tried seperately (pagination & wrapper) as well, it's working in sepetaetly but not working when i include pagination with wrapper.

*********Apex Class ************
public class OpportunityListWithWrapperClass {
   
    //Variables for Wrapper
    public List<wrapperClass> wrapperList{get;set;}
    public boolean normalList{get;set;}
    public boolean selectedList{get;set;}
    Public List<WrapperClass> SelectedWrapperList{get;set;} 
    
    //Variable For Pagination
    public Integer size{get;set;}
    public Integer noOfRecords{get;set;}
    Public List<SelectOption> paginationSizeFixing{get;set;}
    
     //Constructor 
    public OpportunityListWithWrapperClass(){
        normalList = True;
        selectedList = False;
    	selectOpp(); 
        size=5;
        
        paginationSizeFixing = New List<selectOption>();
        paginationSizeFixing.add(New selectOption('5','5'));
        paginationSizeFixing.add(New selectOption('10', '10'));
        paginationSizeFixing.add(New selectOption('20', '20'));
        paginationSizeFixing.add(New selectOption('30', '30'));
    }
    
    
    //Method For Pagination for Wrapper
    Public Apexpages.StandardSetController setCon{
        
        get{if(setCon == Null){
            
            setCon = New ApexPages.StandardSetController(database.getQueryLocator([select Id,name,accountId,account.name,stageName,Amount,closeDate
                                                                               From Opportunity]));    
             setCon.setPageSize(Size);
       		 noOfrecords = setCon.getResultSize();            
            }
            return setCon;
        }
             
        set;
        
    }
    
    public PageReference refreshSize(){
        setCon.setPageSize(Size);
        return Null;
    }
    
    Public List<Opportunity> getOpportunities(){
        return (List<Opportunity>) setCon.getRecords();
    }
    
   
    
    public void selectOpp(){
        
        List<Opportunity> allOpp = [select Id,name,accountId,account.name,stageName,Amount,closeDate
                                                                               From Opportunity];
        
        set<Id> oppId = New Set<Id>();
        
        for(Opportunity opp : allOpp){
            
            oppId.add(opp.accountId);
        }
        
        List<Account> relatedAccount = [Select id,name from Account Where ID IN: oppId];
        
        wrapperList = new list<wrapperClass>();

        for(Opportunity childRec : allOpp ){
            
            for(Account parentRec : relatedAccount){
                
                if(parentRec.Id == childRec.AccountId){
                    wrapperClass wrap = New WrapperClass();
                    wrap.acc = parentRec;
                    wrap.opp = childRec;
                    wrapperList.add(wrap);
                }
                if(parentRec.Id == Null){
                    wrapperClass wrap = new WrapperClass();
                    wrap.opp = childRec;
                    wrapperList.add(wrap);
                }
            }
            
            
        }
        
    } 
    
    public void proceedWithSelected(){
        selectedWrapperlist = new List<wrapperClass>();
        normalList = false;
        selectedList = true;
        
        for(wrapperClass selectedWrapObj : wrapperList){
            if(selectedWrapObj.selected == True){
                selectedWrapperlist.add(selectedWrapObj);
                if(selectedWrapperlist != Null){
                apexPages.addMessage(New ApexPages.message(Apexpages.Severity.CONFIRM, 'Cheers !! Its Your Selected Opportunities' ));
                }
            }
        }
        
    }
    
    
    public Class wrapperClass{
        public Account acc{get;set;}
        public Opportunity opp{get;set;}
        public boolean selected{get;set;}
        public wrapperClass(){
            selected = false;
        }
    } 
}

****** Visualforce *********
 
<apex:page controller="OpportunityListWithWrapperClass" tabStyle="Opportunity">
    <apex:form >
        <apex:actionFunction name="refreshSizeOfPage" action="{!refreshSize}" reRender="pbId" status="fetchStatus" />
        <apex:sectionHeader title="Opportunity Details" subtitle="With Related Accounts"/>
        <apex:pageMessages />
        <apex:pageBlock id="pbId" title="Oportunity Details">
            <apex:commandButton value="Proceed With Selected" action="{!proceedWithSelected}"/>
            <apex:pageBlockSection columns="1">
                
                <apex:pageBlockTable value="{!wrapperList}" var="wrap" rendered="{!normalList}">
                    
                    <apex:column headerValue="Select">
                    	 <apex:inputCheckbox value="{!wrap.selected}"/>
                    </apex:column>
                    
                    <apex:column value="{!wrap.opp.name}"/>
                    
                    <apex:column value="{!wrap.acc.name}" />
                </apex:pageBlockTable>
                
                <apex:pageBlockTable value="{!selectedWrapperList}" var="wrap" rendered="{!selectedList}">
                    
                    <apex:column headerValue="Selected">
                        <apex:inputCheckbox value="{!wrap.selected}"/>
                    </apex:column> 
                    <apex:column value="{!wrap.opp.name}" />
                    <apex:column value="{!wrap.acc.name}" />
                    
                </apex:pageBlockTable>
                
                
             
            </apex:pageBlockSection>
            
            <apex:panelGrid columns="8">
                    <apex:selectList value="{!size}" multiselect="false" onchange="refreshSizeOfPage();" size="1">
                        <apex:selectOptions value="{!paginationSizeFixing}" />
                    </apex:selectList>
                   
                   <apex:commandButton status="fetchStatus" title="Previous Page" reRender="pbId" value="first"
                                       action="{!setCon.first}" disabled="{!!setCon.hasPrevious}"/>
					<apex:commandButton status="fetchStatus" title="Previous Page" value="Previous" reRender="pbId"
                                        action="{!setCon.Previous}" disabled="{!!setcon.hasPrevious}"/>
                    <apex:commandButton status="fetchStatus" title="Next Page" value="Next" reRender="pbId"
                                         action="{!setCon.Next}" disabled="{!!setCon.hasNext}"/>
                   <apex:commandButton status="fetchStatus" title="Last Page" value="Last" reRender="pbId"
                                       action="{!setCon.last}"  disabled="{!!setCon.hasNext}"/>
                   
                   <apex:outputLabel >
                   	{!(setCon.pageNumber * size)+1-size}-{!(setCon.pageNumber * Size)} of {!noOfRecords}
                   </apex:outputLabel>
                   
                   <apex:outputPanel >
                       <apex:actionStatus id="fetchStatus">
                           <apex:facet name="start">
                               <img src="https://media.giphy.com/media/l4eA8oZpx71oQ/giphy.gif" width="25" height="25"/>
                           </apex:facet>
                       </apex:actionStatus>
                   </apex:outputPanel>
                </apex:panelGrid>
            
            
        </apex:pageBlock>
    </apex:form>
</apex:page>


   <!--<apex:pageBlockTable value="{!wrapperList}" var="wrap" rendered="{!normalList}">
                    <apex:column headerValue="Select">
                    	 <apex:inputCheckbox value="{!wrap.selected}"/>
                    </apex:column>
                    <apex:column value="{!wrap.opp.name}" />      
                    <apex:column value="{!wrap.acc.name}" />
                </apex:pageBlockTable>
                </apex:pageBlockSection> 
            <apex:pageBlockSection columns="1"> 
                <apex:pageBlockTable value="{!selectedWrapperList}" var="wrap" rendered="{!selectedList}">
                    
                    <apex:column headerValue="Selected">
                        <apex:inputCheckbox value="{!wrap.selected}"/>
                    </apex:column> 
                    <apex:column value="{!wrap.opp.name}" />
                    <apex:column value="{!wrap.acc.name}" />
                    
                </apex:pageBlockTable> -->

**** Currently Showing Output****


User-added image



Thnaks in Advance!!

Regards,
Soundar 
Hi,
can we connect an android application like barcode scanner with salesforce?
My requirement is when i scan a barcode of a product that should refer to the field in the custom object which already contains that value...
Thanks...