• dev rana 10
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
Hello Ever one i want generate QR Code through apex And VF So can You plz give some code.


Thanks in Advance
Hello Every on i m trying to delete record through controller but not able to do.

This is my vf page
<apex:page sidebar="false" showHeader="false" controller="customerEditRemoveController">
      <apex:form id="form" >
             <apex:pageBlock title="Customer Detail">
                <apex:pageMessages ></apex:pageMessages>
                   <apex:pageBlockTable value="{!Custreg}" var="row">
                        <apex:column >
                           <apex:outputLink title="" value="/{!row.id}/e?retURL=/apex/{!$CurrentPage.Name}" style="font-weight:bold">Edit</apex:outputLink>&nbsp;|&nbsp;
                           <a href="javascript:if (window.confirm('Are you sure?')) DeleteAccount('{!row.Id}');" style="font-weight:bold">Del</a>
                        </apex:column>
                        <apex:column value="{!row.Name__c}"/>
                        <apex:column value="{!row.Last_Name__c}"/>
                        <apex:column value="{!row.Mobile__c}"/>
                        <apex:column value="{!row.Email__c}"/>
                        <apex:column value="{!row.Country__c}"/>
                 </apex:pageBlockTable>
             </apex:pageBlock>
     <apex:actionFunction action="{!deletecustomer}" name="deletecustomer" reRender="form" >
       <apex:param name="RegCustId" value="" assignTo="{!SelectedRegCustId}"/>
     </apex:actionFunction>
  </apex:form>
</apex:page>

This is my Controller
public class customerEditRemoveController {
    public List<devrana__RegCustomer__c> Custreg { get; set; }
    //used to get a hold of the account record selected for deletion
   public string SelectedRegCustId { get; set; }
     public customerEditRemoveController() {
       //load account data into our DataTable
       LoadData();
   }
    private void LoadData() {
       Custreg = [Select id, devrana__Address__c,devrana__Adults__c,devrana__Arival_Time__c,devrana__child__c,devrana__Country__c,devrana__Departure_time__c,devrana__Email__c,devrana__Last_Name__c,devrana__Mobile__c,devrana__Name__c,devrana__Reservation_Type__c,devrana__Rooms__c from devrana__RegCustomer__c limit 20];
     }
      public void deletecustomer(){
            if (SelectedRegCustId == null) {
            return;
      }
           devrana__RegCustomer__c tobeDeleted = null;
         for(devrana__RegCustomer__c rec : Custreg)
            if (rec.Id == SelectedRegCustId) {
            tobeDeleted = rec;
            break;
         }
       
       //if account record found delete it
      if (tobeDeleted != null) {
       Delete tobeDeleted;
      }
         //refresh the data
      LoadData();
   }

}

 
Hello all i m new in salesforce i m trying to all my records of coustome object in slect list.. i writen my code and pass query but i m not getting any record in select list. plese give some guidence
 
this is my controller

 public class bill{
        public String billOptions{ get; set;}
          public String selectedVal { get; set;}
            public List<SelectOption> getbillOptions(){    
               List<selectOption> options = new List<selectOption>();  
                for(devrana__Food_Menu__c menu : [SELECT devrana__Menu_Name__c from devrana__Food_Menu__c]){
           options.add(new SelectOption(menu.devrana__Menu_Name__c,String.valueOf (menu.devrana__Menu_Name__c)));
            }
              return options;
            }
}


This is my VF Page.

<apex:page controller="bill">  
<apex:form >  
    <apex:selectList value="{!billOptions}">   
    <apex:selectOptions value="{!billOptions}" />  
</apex:selectList>  
</apex:form>  
</apex:page>
Hi all 
    i am trying to insert record from site to custome object but  it will give Authorization Required
      page. and record cant be insert..

   give me suggestion 
     
     this is my site link
         http://devang-developer-edition.ap2.force.com/devang/devrana__vf1
           the form is avilable on registration link given in table 

  thanks in advance.
Hi all i m new in salesforce i m trying to insert value in sobject but value of inputfiled is not passing in sobject.


this is my Controller

     public class reg {
             devrana__registration__c registration = new devrana__registration__c();        
                      public devrana__registration__c getregistration()
                      {
                                   return registration;
                        }                          
                          public PageReference save()
                            {   
                                   insert registration;
                                   return null;   
                            }
               }

this is my Vf page
       <apex:page controller="reg" >
    <apex:form >
       <p><b>registraion Page</b><br /></p>
           <apex:panelGrid columns="2" style="margin-top:1em;">
                  <p><b>UserName</b><br />
                     <!--apex:inputText required="true" id="username" /-->
                     <apex:inputField value="{!registration.name__c}"/>                   
                  </p>
                  <p><b>Password</b><br />
                     <apex:inputSecret id="password" />
                  </p>
                 <apex:commandButton action="{!save}" value="Register" id="register"  immediate="true"/>
           </apex:panelGrid>
    </apex:form>
</apex:page>

this is my record which is Auto number
User-added image
 
Hello every one i m new in Lightning. I m trying to create one simple application.
but whene i m check in preview i will get this error.
plz give some suggation to solve this errror.
User-added image
And when i m click on submit button i get this error.
User-added image
Hello Every on i m trying to delete record through controller but not able to do.

This is my vf page
<apex:page sidebar="false" showHeader="false" controller="customerEditRemoveController">
      <apex:form id="form" >
             <apex:pageBlock title="Customer Detail">
                <apex:pageMessages ></apex:pageMessages>
                   <apex:pageBlockTable value="{!Custreg}" var="row">
                        <apex:column >
                           <apex:outputLink title="" value="/{!row.id}/e?retURL=/apex/{!$CurrentPage.Name}" style="font-weight:bold">Edit</apex:outputLink>&nbsp;|&nbsp;
                           <a href="javascript:if (window.confirm('Are you sure?')) DeleteAccount('{!row.Id}');" style="font-weight:bold">Del</a>
                        </apex:column>
                        <apex:column value="{!row.Name__c}"/>
                        <apex:column value="{!row.Last_Name__c}"/>
                        <apex:column value="{!row.Mobile__c}"/>
                        <apex:column value="{!row.Email__c}"/>
                        <apex:column value="{!row.Country__c}"/>
                 </apex:pageBlockTable>
             </apex:pageBlock>
     <apex:actionFunction action="{!deletecustomer}" name="deletecustomer" reRender="form" >
       <apex:param name="RegCustId" value="" assignTo="{!SelectedRegCustId}"/>
     </apex:actionFunction>
  </apex:form>
</apex:page>

This is my Controller
public class customerEditRemoveController {
    public List<devrana__RegCustomer__c> Custreg { get; set; }
    //used to get a hold of the account record selected for deletion
   public string SelectedRegCustId { get; set; }
     public customerEditRemoveController() {
       //load account data into our DataTable
       LoadData();
   }
    private void LoadData() {
       Custreg = [Select id, devrana__Address__c,devrana__Adults__c,devrana__Arival_Time__c,devrana__child__c,devrana__Country__c,devrana__Departure_time__c,devrana__Email__c,devrana__Last_Name__c,devrana__Mobile__c,devrana__Name__c,devrana__Reservation_Type__c,devrana__Rooms__c from devrana__RegCustomer__c limit 20];
     }
      public void deletecustomer(){
            if (SelectedRegCustId == null) {
            return;
      }
           devrana__RegCustomer__c tobeDeleted = null;
         for(devrana__RegCustomer__c rec : Custreg)
            if (rec.Id == SelectedRegCustId) {
            tobeDeleted = rec;
            break;
         }
       
       //if account record found delete it
      if (tobeDeleted != null) {
       Delete tobeDeleted;
      }
         //refresh the data
      LoadData();
   }

}

 
Hello all i m new in salesforce i m trying to all my records of coustome object in slect list.. i writen my code and pass query but i m not getting any record in select list. plese give some guidence
 
this is my controller

 public class bill{
        public String billOptions{ get; set;}
          public String selectedVal { get; set;}
            public List<SelectOption> getbillOptions(){    
               List<selectOption> options = new List<selectOption>();  
                for(devrana__Food_Menu__c menu : [SELECT devrana__Menu_Name__c from devrana__Food_Menu__c]){
           options.add(new SelectOption(menu.devrana__Menu_Name__c,String.valueOf (menu.devrana__Menu_Name__c)));
            }
              return options;
            }
}


This is my VF Page.

<apex:page controller="bill">  
<apex:form >  
    <apex:selectList value="{!billOptions}">   
    <apex:selectOptions value="{!billOptions}" />  
</apex:selectList>  
</apex:form>  
</apex:page>
Hi all 
    i am trying to insert record from site to custome object but  it will give Authorization Required
      page. and record cant be insert..

   give me suggestion 
     
     this is my site link
         http://devang-developer-edition.ap2.force.com/devang/devrana__vf1
           the form is avilable on registration link given in table 

  thanks in advance.
Hi all i m new in salesforce i m trying to insert value in sobject but value of inputfiled is not passing in sobject.


this is my Controller

     public class reg {
             devrana__registration__c registration = new devrana__registration__c();        
                      public devrana__registration__c getregistration()
                      {
                                   return registration;
                        }                          
                          public PageReference save()
                            {   
                                   insert registration;
                                   return null;   
                            }
               }

this is my Vf page
       <apex:page controller="reg" >
    <apex:form >
       <p><b>registraion Page</b><br /></p>
           <apex:panelGrid columns="2" style="margin-top:1em;">
                  <p><b>UserName</b><br />
                     <!--apex:inputText required="true" id="username" /-->
                     <apex:inputField value="{!registration.name__c}"/>                   
                  </p>
                  <p><b>Password</b><br />
                     <apex:inputSecret id="password" />
                  </p>
                 <apex:commandButton action="{!save}" value="Register" id="register"  immediate="true"/>
           </apex:panelGrid>
    </apex:form>
</apex:page>

this is my record which is Auto number
User-added image