• salesforce me
  • NEWBIE
  • 363 Points
  • Member since 2015
  • salesforce

  • Chatter
    Feed
  • 8
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 233
    Replies
Please, share your trigger and test code if you have simmillar one for this requirement.

When a user select a product picklist from a custom field (product__c) on an opportunity, it should create a opportunity product on its related list.
Also, when a user create a opportunity product from the related list, the product__C field on the opportunity should be updated.

We will have only one product for each opportunity.

Truly, thanks for any comments and helps, in advance.
 
  • January 13, 2016
  • Like
  • 0
Hello,

I am dealing with currency field in my reports. 
When I create a Report, I sometimes have blank value when there is no currency, and when i divide currecny for blank values it adds -

Is there any solution by using formulas, to display 0 Dollar or atleast 0.

Thank you
  • September 29, 2015
  • Like
  • 0
hi
I created one date/time field,i want to create one date/time formulafield with mm/dd/yyyy/hh:mm:ss.plz send me formula
Hello,

I am system admin for org,
Why do idont see all users, and login for all users,

What should i do to do that
  • September 22, 2015
  • Like
  • 0

What is the Use of QueryFactor Class and Where do we use it in Real Time ?
What is the Use of Type Class in Salesforce and Where do we Use it in Realtime?
Hi
Please guide me on how to perform code review?
likewise what tools used,  what doc we ​​perform code review, who will review at each step & approve.

please elaborate.
thanks
krishna​​
winter 16-Release date and when we can work on winter-16 features...
Hi.
How to upload more than 10K records from CSV file to salesforce(Leads,Accounts..)using visualforce by giving mapping.
Please help on this .
visualforce:--
<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection columns="4">
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Import Lead" action="{!importCSVFile}"/>
               
                  <apex:selectList label="Select User:"  value="{!selecteduserId}" size="1">
                  <apex:selectOptions value="{!UsersList}">
                  </apex:selectOptions>
                  </apex:selectList>
               <!------
                  <apex:selectList value="{!selecteduserId}" size="1" multiselect="false"  >
                                          <apex:selectOptions value="{!ListOfUser}" />
                                 </apex:selectList>
                  ----->
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!lList}" var="l">
              <apex:column value="{!l.Lastname}" />
              <apex:column value="{!l.Phone}" />
              <apex:column value="{!l.Company}" />
              <apex:column value="{!l.Email}" />
              
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>



Apex:---

public with sharing class importDataFromCSVController {

    public String selecteduserId { get; set; }

 


    public List<User> UserTemp = new List<User>();
    
    
    
    public List<SelectOption> UsersList
    {
        get
        {
            UserTemp = [Select u.LastName, u.Id, u.FirstName, u.Email From User u];
           
           
            
            UsersList= new List<SelectOption>();
            
            for(User temp : UserTemp)
            {
                UsersList.add(new SelectOption(temp.Id, temp.LastName));
            }
            return UsersList;
        }
        set;
    }



    public String getUsersList() {
        return null;
    }

public Blob csvFileBody{get;set;}
public string csvAsString{get;set;}
public String[] csvFileLines{get;set;}
public List<Lead> llist{get;set;}
  public importDataFromCSVController(){
    csvFileLines = new String[]{};
    llist = New List<Lead>();
  }
 
  public void importCSVFile(){
       try{
           csvAsString = csvFileBody.toString();
           csvFileLines = csvAsString.split('\n');
            
           for(Integer i=1;i<csvFileLines.size();i++){
               Lead lObj = new Lead() ;
               string[] csvRecordData = csvFileLines[i].split(',');
               lObj.Lastname = csvRecordData[0] ;             
               lObj.Phone = csvRecordData[1];
               lObj.Company= csvRecordData[2];
               lObj.Email= csvRecordData[3];   
               //accObj.Industry = csvRecordData[4];    
               lObj.OwnerId = selecteduserId;
                                                                                    
               llist.add(lObj);   
           }
        insert llist;
        }
        catch (Exception e)
        {
            ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR,'An error has occured while importin data Please make sure input csv file is correct');
            ApexPages.addMessage(errorMessage);
        }  
  }
}
I have ceated to fields Mobile Number and SMS Description using VF Page. I'm able to create the task, When I click the button submit, these to field details added to activities in account. How to do it.Please anybody help me on this.
 
hello
I need to to find records for each and every user ,and find who had the highest record count then the user is owner of the remaining records.
Hi
how to devide section blocks using lightning components  in salesforce 
Thanks
SAi
  • March 21, 2016
  • Like
  • 0
what is Context-Specific Handler Methods in triggers?
 can any one explain wid example please>?
 

I have this Save Button code.

<apex:pageBlockButtons >
        <apex:commandLink value="Save" action="{!save}" id="savebutton" styleClass="btn" style="text-decoration:none;padding:4px;"></apex:commandlink>
        </apex:pageBlockButtons>

I have a lot of issues and bugs on "Saving" data in my visualforce page.  And was wondering if you guys can shed some light on how to fix it.  It's been bugging me and becoming a show stopper in my development.

Problems when pressing "Save"
Problem 1 - If I enter data in a text field and press "Save", it reloads but doesnt save the data.  But when I enter data in a text field AND click out and save... it saves it.  I cant have that.  I'm getting complaints on that.  Especially when they keep entering data then just presses save and it doesnt save the last data get really annoying.  

Problem 2 - when putting Target="_self" it saves it inside that iFrame.  If I do Target="_parent" it saves it but just showing the VF Page and I lose my headers, search, etc...  I just want to press save and stay in the SAME tab.  Instead, it reloads in the first tab and you get more mad when you click on the tab you want and the data doesnt save.

I just want to save the data and refresh in the same tab.  Thats all I need.  Please help 

Hi All,

I have enabled business and person account. Currently I have used lead conversion using apex code. I have requriement like if the lead have company name then lead will be converted into business account,contact and opportunity otherwise the lead will be conerted into person account and opportunity.

Let me know how to acheive this.

Thanks,
​Vijay
I have a scenario, after clikc on Copy from Parent Account check box,

address copied from Account object  to Contact object.

without using any customization how i can reach this...

can it possible to using Workflow rules ?
whats is the use of {}, [] these to use in soql query, is there any specific use to use ?

can you pls explaine me with query exampls.


thanks in advance. 
  • March 08, 2016
  • Like
  • 0
Hi Guys,
Below is the code of my VF page and my controller and i am getting a null pointer exception.I am new to apex and VF development .
Please let me know where i am going wrong and help me in this regard.
Thanks in anticipation.

VF Page :


<apex:page controller="ShowHideController"> <!-- controller="AccountController" -->
<apex:form >
<apex:pageBlock title="Select the options"> Vehicle Names&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <apex:selectList value="{!selectedVehicleId}" size="1">
<apex:selectOptions value="{!VehicleType}"/>
<apex:actionSupport event="onchange" reRender="a"/>
</apex:selectList> Available parts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<apex:pageBlockSection id="a">
<apex:selectList value="{!selectedBikePartId}" size="5">
<apex:selectOptions value="{!BikeParts}"/>
</apex:selectList>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

Controller :
public class ShowHideController {
    public String selectedVehicleId{get;set;} 
    public String selectedBikePartId{get;set;}
     // this var is available only in the view and not seen in the
    //  controller methods below
    
    
    public ShowHideController(){
        
        
        
    }
    
    public List<SelectOption> getVehicleType() {
                List<SelectOption> vehicletypelist= new List<SelectOption>();
                  vehicletypelist.add( new SelectOption('','--Select--'));
                  for( Vehicle__c ve : [select Id,VehicleType__c from Vehicle__c ]) {
                          vehicletypelist.add( new SelectOption(ve.Id,ve.VehicleType__c));
                  }
                 return vehicletypelist;
           }
    public List<SelectOption> getBikeParts(){
        List<SelectOption> bikepartlist=new List<SelectOption>();
        List<SelectOption> options= new List<SelectOption>();
            if(selectedVehicleId!=null && selectedVehicleId=='Bike'){
                for(Vehicle__c ve2:[select Id,Bike_parts_available__c from Vehicle__c where VehicleType__c=:selectedVehicleId ]){
                    bikepartlist.add(new SelectOption(ve2.Id,ve2.Bike_parts_available__c));
                    
                }
                }
                 else
                    {
                        bikepartlist.add( new SelectOption('--None--','--None--'));
                    }
            
        
        return bikepartlist;
    }

//Below code is not implemented
    public List<SelectOption> getCarParts(){
        List<SelectOption> carpartlist=new List<SelectOption>();
        List<SelectOption> options= new List<SelectOption>();
            if(selectedVehicleId!=null && selectedVehicleId=='car'){
                for(Vehicle__c ve3:[select Id,Car_parts_available__c from Vehicle__c where VehicleType__c=:selectedVehicleId]){
                    carpartlist.add(new SelectOption(ve3.Id,ve3.Car_parts_available__c));
                    
                }     
            }
        
        return carpartlist;
    }
    
}
 
Hi ,


can any one help out with valid upload file API from salesforce to Bo.xom
 
Hello,

I am new to Salesforce and I have to integrate Salesforce wirh some CMS.

Basically the scenario is like this, presently date into website comes from another CMS.

I want to provide this service from Salesforce, such that Salesforce will provide data feed to CMS (using objects and records) and it will be available on website.

Please give suggestion of how to do this. Is there any app on AppExchange to do this or have to write Webservice for this?

Thanks in advance.
Hi,
I am fetching date using TODAY() function.Now i want to add another date in todays date.I am fetching the custom date from my custom object field.all this i need on VF page.

im using {!Today()} ---------------->for fetching todays date
{!obj.Custom_date} ---------------->Custom date

im trying to add like 
{!TODAY()}+{!obj.Custom_date__c}

Output receiving is as below

 2/8/2016+10/31/2015 2:59 PM




 
i am doing all the ways to connct salesforce calender to google caleder but can't work help me
Is it possible to auto populate the picklist value to the text field in standard page. If so, can you please explain how to achieve it.
what is the null pointer
 
how to use data.com api using php ? 
Please provide with example .