• Mehul Makwana
  • NEWBIE
  • 147 Points
  • Member since 2016
  • Salesforce Developer

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 35
    Replies
1)The Review_c object have a lookup relationship to the job_Application_c object.The job_Application_c object has a master detail relationship up to the
 position_c object.The relationship is based on the auto populated defaults? 
 What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?
 
 A.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
 B.Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _ C data.
 C.Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through me Job_Applicacion_c inject.
 D.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.


2)A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce. 
  Which kind of relationship would a developer use to relate the Account to Warehouse?
 
  A. Lookup
  B. One to Many
  C. Master-Detail
  d. Parent-Child


3)A developer wants to create a custom object to track Customer Invoices. 
  How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?

A. The Invoice should have a Master-Detail relationship to the Account
B. The Account should have a Master-Detail relationship to the Invoice.

4)What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production? Choose 2 answers
  
 A.The REST API and ApexTestRun method
 B.The Run Tests page in Salesforce Setup
 C.The Apex Test Execution page in Salesforce Setup
 D.The Test menu in the Developer Console
 
Hello, 

I have added inlineEditSupport and a commandButton to my vf page, however when testing my command button I am getting the error: 
 
Attempt to de-reference a null object
Error is in expression '{!saveCS}' in component <apex:commandButton> in page r2m_contracts_out: Class.R2MPipeLineController.saveCS: line 15, column 1

An unexpected error has occurred. Your development organization has been notified.
Here is my controller: 
 
public class R2MPipeLineController{

    public List<Opportunity> listOfLive {get; set;}
    public List<Opportunity> listOfViability {get; set;}
    public List<Opportunity> listOfLaunchPad {get; set;}
    public List<Opportunity> listOfContractSent {get; set;}
    public List<Opportunity> listOfQualified {get; set;}
    public Opportunity Live {get; set;}
    public Opportunity Viability {get; set;}
    public Opportunity LaunchPad {get; set;}
    public Opportunity ContractSent {get; set;}
    public Opportunity Qualified {get; set;}
    
    public PageReference saveCS(){
    UPDATE ContractSent;
    return null;
    }
    
public R2MPipeLineController() {
    listofLive = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Live' ORDER BY Weeks_Live__c DESC];
    listOfViability = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Viability' ORDER BY Days_Since_Last_Modified__c DESC];
    listOfLaunchPad = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Launch Pad' ORDER BY Days_Since_Last_Modified__c DESC];
    listOfContractSent = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c, Contract_Age__c from Opportunity WHERE StageName = 'Contract Sent' ORDER BY Contract_Age__c ASC];
    listOfQualified = [Select id, name, CreatedDate, Company_Name__c, Vertical__c, Weeks_Live__c, Days_Since_Last_Modified__c, Contract_SENT__c, NextStep, LeadSource, Probability, Spend_Last_Week__c, Spend_Last_30_Days__c, Owner_Name__c, Revenue_All_Time__c from Opportunity WHERE StageName = 'Qualified' ORDER BY Probability DESC]; 
}
}

and here is the pageblock that is yielding the error: 
 
<apex:form >
             <apex:pageBlock title="Contracts Out - Todd Deluke" mode="inlineedit">
                         <table cellpadding="5" style="border-collapse: collapse;table-layout:fixed" width="1100" border="1" >
                
                <apex:variable var="count" value="{!0}"/>
                <apex:repeat value="{!listOfContractSent}" var="cs">
                                                                         <tr style="display:{!IF(cs.Owner_Name__c ='Todd DeLuke', 'table-row', 'none')}">
                                  
                           
                             <td width="50">
                             <apex:outputField value="{!cs.Probability}" >
                                     <apex:inlineEditSupport event="ondblclick" showOnEdit="saveButton, cancelButton" />
                                </apex:outputField>
                            </td>
                          
                          
                        </tr>
                                                          </apex:repeat>
            </table>
            <apex:commandButton id="update" action="{!saveCS}" value="Update Opptys" 
        styleclass="updateButton"/> 
            </apex:pageBlock>
            </apex:form>

I am new to this type of functionality - and I can't seem to figure out what is causing the error.  Can anyone help?

Thanks in advance!

John


 
HI

Any one let me know how we will create list box fields in salesforce.please explain
Hi All:

I am very new to Salesforce development (just really started this week) and am trying to set up a dev environment for the same.

I have installed Eclipse IDE for Java Developers Version: Mars.2 Release (4.5.2) along with JRE1.8.0_77. I can sign into my Salesforce DEVELOPER EDITION from Eclipse using Force Perspective. However on the 'Choose Initial Project Content' page, I can't see anything. It is completely empty. A screenshot is given below:

Empty Project Content

Just wondering if I can get some help. The tutorial I am trying to do is a basic one as follows:

https://developer.salesforce.com/docs/atlas.en-us.eclipse.meta/eclipse/eclipse_quickstart.htm

Any help will be much appreciated.

Thanks and regards,
Anindya



 
Hello Developers,

In VF email template want Amount field to be rendered based on IF condition like if currency is JYP or USD then render.
<div style="{!IF({!relatedTo.Related_Opportunity__r.CurrencyIsoCode}='JYP', 'display:block', 'display:none')}" >            
Amount : <apex:outputText value="{!relatedTo.CurrencyIsoCode}" rendered="true" /> 
</div>

Please Note: I do not want to go for controller want to achive this through VF Email template only.

Thanks
Mehul
 
Hello Developers,

In VF email template want Amount field to be rendered based on IF condition like if currency is JYP or USD then render.
<div style="{!IF({!relatedTo.Related_Opportunity__r.CurrencyIsoCode}='JYP', 'display:block', 'display:none')}" >            
Amount : <apex:outputText value="{!relatedTo.CurrencyIsoCode}" rendered="true" /> 
</div>

Please Note: I do not want to go for controller want to achive this through VF Email template only.

Thanks
Mehul
 
Hi All, 
We have a multi select html field where users can do CTRL + select multiple values, this should be stored in a multi select field. 

<div class="form-group">
                            <label class="control-label label-form" for="Attrib">Attrib<span class="mandatory"> *</span></label>
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"/>
                                </div>
                                <select multiple="multiple" class="form-control">
                                    <option>Colour</option>
                                    <option>Shape</option>
                                    <option>Size</option>
                                    <option>Weight</option>
                                </select>
                            </div>
                        </div>

How can I store the above selected values in a multi select field? 

Thanks, 
Prasanna
 
//Apex Class

public class ManagePhasescontroller {
    Public Integer count {get; set;}
    Public Integer countRecord {get; set;}
    public boolean bCounter {get;set;}
    Public Integer benchSize {get; Set;}
    public string para{get;set;}

 public void getselectedbenchmark() {
     try{
         if(MonthAcc.Account__c !=null && selectedPhase != null)
         selectedbenchmark = [SELECT Responsible__c,Date_Completed__c,Target_Date__c,Objective__c,Phase__c,Sequence__c from Phase_Benchmark__c where Phase__r.Account__c=:MonthAcc.Account__c AND  Phase__c = :selectedPhase.Id  AND Completed__c=false ORDER BY Sequence__c ASC]; 
        if(selectedbenchmark!=null  && selectedbenchmark.size()>0){
        benchSize = selectedbenchmark.size(); 
        }
            count = 0;
            countRecord = 1;
            bCounter = true;
        }
         catch (Exception e){}
    }
    
    
     //**Method for incement the counter
     public PageReference incrementCounter() {
        
            count++;
         
             countRecord++;
           
             bCounter = false;
      
         return null;
    }
    
    //**Method for decrement the counter
    public PageReference decrementCounter() {
      
            count--;
      
            countRecord--;
   
            return null;
    }
    
    //**Method for fetch count value
    public Integer getCount() { 
        return count;
    }



//VF Page


<apex:outputPanel id="thePanel">
                                <apex:outputPanel styleClass="red" rendered="{!if(selectedPhase!=null,true,false)}" >
                                    <apex:pageBlockSection title="Phase Information">
                                        <apex:outputField value="{!selectedPhase.Phase_Number__c}"/> 
                                        <apex:outputField value="{!selectedPhase.Description__c}"/>
                                        <apex:outputField value="{!selectedPhase.Start_Date__c}"/>
                                        <apex:outputField value="{!selectedPhase.End_Date__c}"/>
                                    </apex:pageBlockSection><br/>
                                    <apex:outputPanel rendered="{!if(selectedbenchmark=null,true,false)}" >
                                        <center> All Benchmark for this Phase have been Completed.<br/><br/>
                                            <apex:commandButton value="Move to Next Phase" action="{!movenextphase}" reRender="MonthlyFrm"/>
                                        </center>
                                    </apex:outputPanel>
                                   </apex:outputPanel>
                                </apex:outputPanel><br/>
                                <apex:outputPanel id="Panel">
                                <apex:repeat value="{!selectedbenchmark}" var="bench" id="theRepeat" rows="1" first="{!if(count=-1,0 ,count)}">
                                    <apex:outputPanel styleClass="red"  rendered="{!if(selectedbenchmark!=null,true,false)}">
                                   
                                       <apex:pageBlockSection title="Phase BenchMark">
                                         
                                            <apex:outputField value="{!bench.Responsible__c}"/> 
                                            <apex:outputField value="{!bench.Target_Date__c}"/>
                                            <apex:outputField value="{!bench.Objective__c}"/>
                                            <apex:outputField value="{!bench.Date_Completed__c}"/>  
                                          
                                       </apex:pageBlockSection><br/>    
                                    <apex:outputPanel >
                                   <center>  
                                 
                                   <apex:outputpanel id="panel2">
                   
                                    <apex:commandButton value="<<" rerender="btn2" disabled="{!if((bCounter=true || count=0),true ,false)}"/>
                                    <apex:actionSupport id="btn2" event="onclick" action="{!decrementCounter}" rerender="panel,panel2,out,panel1"/>
                                        
                                    </apex:outputpanel>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <apex:outputPanel >
                                    <apex:commandButton value="Complete this Benchmark" action="{!completebenchmark}" reRender="MonthlyFrm,Panel">
                                    <apex:param value="{!bench.Id}" assignTo="{!para}"/></apex:commandButton>
                                    </apex:outputPanel>
                                    &nbsp;&nbsp;&nbsp;&nbsp;<apex:outputText value="{!countRecord}" id="out"/>/{!benchSize}&nbsp;&nbsp;&nbsp;&nbsp;
                                    <apex:outputpanel id="panel1">
                                    <apex:commandButton value=">>" rerender="btn1" disabled="{!if(countRecord=benchSize,true ,false)}"/>
                                    <apex:actionSupport id="btn1" event="onclick" action="{!incrementCounter}" rerender="Panel,panel2,out,panel1"/>
                                    </apex:outputpanel>
                                                                   
                                                                  
                                </center>
                            </apex:outputPanel>                             
                        </apex:outputPanel>
                       </apex:repeat>
                    </apex:outputPanel>

 
  • May 27, 2016
  • Like
  • 0
Hello everybody,
I need your help. I need to connect my sandbox to my eclise but for security reason i can't reset my security token and the conection from the two ambients doesn't work. Does anybody know a different way to make the connection? My Ip should be a safe ip .
Thanks every body
Hi all,

I have created a community with customer community license. I want external user to have the ability to attach images through notes and attachments in case object , but not able to see the notes and attachments related list on community for case. Why so? Pl help
Is it possible to write a trigger on EmailMessage object? I would like to track count of the emials that have been sent from salesforce.

Thanks In Advance.
The requirement was to create a Radio button(RB) application in SF. Where a person must be able to rate an application with values 1-5 and these values must be Radio button.
What or how must a developer create it
I have a custom picklist on Account objects it contains values A,B and C. I am accessing this picklist at visualforce by using the <apex:inputfield> .So I don't want to get all the picklist values  , I want values (B and C) at visualforce, Could you please suggest me.
  • May 17, 2016
  • Like
  • 0
Hi All,

I have requirement to upload the text file to FTP server from Salesforce. How to do this. Is there any way to do this..?? I am generating the text file from vf page when custom button click..

Please help on this ASAP
Hii Everyone,

Here i am tried to redirect the button to standard Task page after saving.
It displays an error that EmailAuthor page not found Plz help on this .

public PageReference attachPdfandEmail() 
   {
        PageReference pdf;
        pdf= Page.Quote_PDF;
        pdf.getParameters().put('id', selectedQuote);
        Blob pdfBlob = Test.isRunningTest() ? Blob.valueOf('UNIT.TEST') : pdf.getContent();
        Attachment myAttach = new Attachment();
        myAttach.Parentid = quotes.id;
        myAttach.name = 'Quote_v'+(attachments.size()+1)+'.pdf';
        myAttach.body = pdf.getContentAsPdf();
        insert myAttach;
        system.debug(myattach.id);
        PageReference ref=new PageReference('/apex/_ui/core/email/author/EmailAuthor?p2_lkid='+acc.id+'&rtype=003&p3_lkid='+quotes.id);
          ref.setRedirect(true);
          return ref;
        
        
    }
  • May 16, 2016
  • Like
  • 0
can any one tell me how to upload video in vf page which components are uses my video lenth more then 25 mb then what i do 
 
thanks 
sandeep
1)The Review_c object have a lookup relationship to the job_Application_c object.The job_Application_c object has a master detail relationship up to the
 position_c object.The relationship is based on the auto populated defaults? 
 What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?
 
 A.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
 B.Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _ C data.
 C.Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through me Job_Applicacion_c inject.
 D.Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.


2)A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce. 
  Which kind of relationship would a developer use to relate the Account to Warehouse?
 
  A. Lookup
  B. One to Many
  C. Master-Detail
  d. Parent-Child


3)A developer wants to create a custom object to track Customer Invoices. 
  How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?

A. The Invoice should have a Master-Detail relationship to the Account
B. The Account should have a Master-Detail relationship to the Invoice.

4)What should a developer working in a sandbox use to exercise a new test class before the developer deploys that test class to production? Choose 2 answers
  
 A.The REST API and ApexTestRun method
 B.The Run Tests page in Salesforce Setup
 C.The Apex Test Execution page in Salesforce Setup
 D.The Test menu in the Developer Console
 
Hi all,

Within the Lookup page, when creating a new contact, there is no place to enter in the accout. See attached.

I would like to either add that field or if someone can send me a quick visual force page that has that field that would be great.

Lookup page adding new contact
Thanks in advance!
 
I am attempting to uninstall an expired installed package from our production org. It is called ShipCRM for UPS by ExactShip, however when I follow the uninstall process I get an error message "Unable to install package - Component is in use by another component in your organization "ShipFromShipmentExtension". This references (2) Apex Classes from the ExactShip package ExactShipUtil and ConfigPropertyUtil.

I attempted to follow the instructions in Knowledge Article 000006188 - Disable or delete an Apex Class or Trigger from a Production Organization starting with the "ShipFromShipmentExtension" Apex Class item. Everything seemed to go well until the final Deployment step when I received a Failed warning with the following error message. "Average test coverage across all Apex Classes and Triggers is 65%, at least 75% test coverage is required".

Can anyone tell me what is going on and if there is a fix for this?User-added image
HI

Any one let me know how we will create list box fields in salesforce.please explain