• A chauhan
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 2
    Replies
i have created trigger in sandbox that avoid duplicate record creation on account object . in sandbox it is showing 100% code coverage while deploying that trigger in production using change set it is giving code coverage error your trigger has 0% code coverage ,every trigger atleast  require 1% code coverage
vf page
<apex:page id="Request_Page" showHeader="true" controller="Request_Page" >
<apex:outputLabel value="Account Name :" for="AccountName"/>                                   
<apex:inputField id="Account" value="{!Opp.AccountId}" label="AccountName"/> 
<apex:commandButton style="float:right" action="{!requestform}" value="{!$Label.site.submit}" id="submit"/>    

apex code

 public PageReference requestform() {
       
   // objAttachment = new Attachment();
    Opportunity Opp = new Opportunity();
    Opp.Name = RequestName;
    Opp.Type = btype;    
    opp.nextStep = nextStep;
    Opp.StageName = stagedata;
    Opp.Scope_of_Initiative__c = stage;
    Opp.Assign_To__c = stageuser;
    Opp.Description = description;
    Opp.CloseDate = closeDate;
    Opp.Customer_Name__c= CustomerName; 
           
    listOpportunities.add(Opp);
        
   if (listOpportunities.isEmpty() == false) {
        Database.insert(listOpportunities);
       
i want to store value in account name (lookup) in opportunity object

 
I have custom controller Request_page .i want to create account name(lookup) field in my visualforce page and wants that account name value to be stored in Opportunity object Account name ! what should be the visualforce page code and apex code ?
I have custom controller Request_page .i want to create account name(lookup) field in my visualforce page and wants that account name value to be stored in Opportunity object Account name what should be the visualforce pahge acode and apex code
i have visualforce pgae called request_page which stores all values in opportubity object like opportunity name,stage,type likewwise i have account anme field on my page but it does not get store in opportunities account name .i want to fetch and store Account Name through my VF Page in the opportunity object i want vf page coding as well as apex class coding 
i  am using custom controller for opportunity and i have field on my page account name, when i enter account name and submit it does not et store in opportuity  i want to fetch and store account name in opportunity object when i click submit button my VF page.
I have completed 33 badges and earn 35000 point but didnot get any goodies or any reward till now, can anyone tell the criteria or anything to get rewarded
Thanks
i have created trigger in sandbox that avoid duplicate record creation on account object . in sandbox it is showing 100% code coverage while deploying that trigger in production using change set it is giving code coverage error your trigger has 0% code coverage ,every trigger atleast  require 1% code coverage