• sreeja
  • NEWBIE
  • 180 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 52
    Replies
//this is a nonvoid method 

 public decimal  c1(){
    
       taxvalue=223.44;
        
     
          
    return taxvalue;
    
    } 


 visualforce i had used the commandbutton to dispaly the value of tax value,it is throughing an error .. how can it display it...

<apex:form>
<apex:commandButton value="returntest"  action="{!c1}" reRender="t"/>
    {!taxvalue}
</apex:form>  
public class Test {

public static void main(String[] args)
{
integer  a = 20;

 system.debug(a);
}
}

how to execute in the anonymous window:??


 i have tried with this code ,it was working fine;;public class Test {


  public class test{
public static void main()
{
integer  a = 20;

 system.debug(a);
}
}

 in anonymous window:test.main(); -- i got 20 . but trying to execute with javacode in salesforce
  • March 26, 2019
  • Like
  • 0
Is it possible  to make the ajax callouts from the salesforce to the external application , and fetch the data .. if so how will be the procedure, any live small example from the 3rd party application .. 

thanks ..
  • March 18, 2019
  • Like
  • 0
 Hi , i had added the alert.js file in saticresource as alert.

alert.js:-
<script>
function myFunction() {
  alert("I am an alert box!");
}
</script>



 and in the Visualforce page :

 
<apex:page >
  
      <apex:includeScript value="{!$Resource.alert}"/>
     
  
   <apex:includeScript value="{!URLFOR($Resource.alert, 'alert')}"/>
  
  
  
  
  <apex:stylesheet value="{!URLFOR($Resource.alert, 'alert')}"/>
  
  <button onclick="myFunction()">Try it</button>
</apex:page>


functionality is not getting work .. thanks 
 
  • March 18, 2019
  • Like
  • 0
hi all, iam a fresher and iam thinking to learn integration as well, i had gone through the trailhead and the rest integration document, but not got idea much, 

can any body share the integraion videos of their respecitve classes  to this id please

sfdc8097@gmail.com

it will be helpful for me to learn , hoping will get good encouragement to learn 
 
thanks 
sree
  • February 13, 2019
  • Like
  • 0
public class Personal_Information{
     
      
      
       public list<Personal_Information__c> perinfo{get;set;}
  
   
   
     
       public void  Insertrecord(string name){
       
       
          
            
              list<Personal_Information__c> listperinfo = new list<Personal_Information__c>();
             
                 Personal_Information__c  perinfo = new Personal_Information__c();
          
          
         perinfo .name = name;
          
          
         listperinfo.add(perinfo );
          
          
          
           
           
           if(! listperinfo.isEmpty()){
           
           
           
              insert listperinfo;
           
           }
          
          
          
       
       }
    
  
  
  
  }





visualforce page:



<apex:page controller="Personal_Information" sidebar="false">
  
  
    <html>
      
        <head>
        
         <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
        </head>
    
      
    
     <body>
     
     
     
        <div class="col-sm-3">
     <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control" id="usr" value ="{!name}" />
    </div>
     </div>
     
     
     <br/>
     
      <button type="button" class="btn btn-success"   action ="{!Insertrecord}" >Save</button>
     
     
     </body>
    
    
 
    
    </html>
  
   
</apex:page>

without use of the salesforce standared fileds, records should have to insert using a custom button , it was not  getting save , any wrong with this??


 
  • February 08, 2019
  • Like
  • 0
hi i had performed the rest callouts, by authorizing the endpoint url into the remotesite settings and later in the anonymous window i had copied and pasted the code form the trailhead..
 the request was sucessfull, and got the response..
the issue was after the selection of the debuglog checkbox the data is not displayed here;
the code is 
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');
request.setMethod('GET');
HttpResponse response = http.send(request);
// If the request is successful, parse the JSON response.
if (response.getStatusCode() == 200) {
    // Deserialize the JSON string into collections of primitive data types.
    Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
    // Cast the values in the 'animals' key as a list
    List<Object> animals = (List<Object>) results.get('animals');
    System.debug('Received the following animals:');
    for (Object animal: animals) {
        System.debug(animal);
    }
}
the screnshots are shown belowgot responseDebug log is Empty
  • February 07, 2019
  • Like
  • 0
how to when to use the remoteaction in salesforce, any small examples to start ... i??

 how do the remote action will work in the salesforce ..
thanks 
sree
  • February 06, 2019
  • Like
  • 0
public class cmpinfocheck{
 
 
  
  
   public  list<Company_Information__c> cmpinfo{get;set;}
   
   public string empname{get;set;}
   
   
    public void cmpdata(){
     
     
     cmpinfo = new list<Company_Information__c>();
      
      
      Company_Information__c cm = new Company_Information__c();
      
      cm.name= empname;
       
     
      cmpinfo.add(cm);
        
        
     insert cmpinfo;
      
    }
    
    
    
    
    
 
 
 }
 
<apex:page controller="cmpinfocheck">
     
  <apex:form>
 <html>
 <head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head> 
  
   <script>

  function save(){
//how to deal with this type of scenario

};

</script>
  
 
   
   <body>
   
    <input type="text"  value="{!empname}"/>
    
   <button onclick="save()"> save</button>
   
   </body>
 
 </html>
 </apex:form>
</apex:page>

 
  • February 06, 2019
  • Like
  • 0
iam using the bootstarp buttons in the salesforce-- button it was not effection eventhough used the libraries ... 
 in need the default button colurs for the all the buttons in the visualforce page... what should have to be include 

 
<apex:page >
 <html>
 
 <head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>


<body>

<div class="container">
  <h2>Button Styles</h2>
  <button type="button" class="btn">Basic</button>
  <button type="button" class="btn btn-default">Default</button>
  <button type="button" class="btn btn-primary">Primary</button>
  <button type="button" class="btn btn-success">Success</button>
  <button type="button" class="btn btn-info">Info</button>
  <button type="button" class="btn btn-warning">Warning</button>
  <button type="button" class="btn btn-danger">Danger</button>
  <button type="button" class="btn btn-link">Link</button>      
</div>

</body>


 </html>
</apex:page>

 
  • February 01, 2019
  • Like
  • 0
i have created a custom objects of  contract__C (parent)and quotatin__C as(child),  and created a masterdetail relation between them ..
 i need to query the parent id as like :

 contact = [select Id,name,accountid from contact where accountid=:selectedAccId];
 

i hve used :


quotation__c =[select id, name , contract__r.id  form quotation__c where contract_r.id =: selectdContid]; 


how can i call this .. any suggestions 

  thanks  
  • December 31, 2019
  • Like
  • 0
public class BusScheduleCache {

    private Cache.OrgPartition part;
    
      
      
       public BusScheduleCache (){
       
        
        Cache.OrgPartition part = cache.org.getpartition('local.BusSchedule');
        
     
       
       }
       
       
       
       
        public void  putSchedule(String busLine, Time[] schedule){
     
      
      
       Part.put(busLine, '12'); 
       
     //  Part.put(schedule, {5,6,7});   
        
        
        }
        
        
        
       public getSchedule(String busLine){
        
        
        
if (cachedvalue!= null) {
    
    return null;
    
} else {
    
      return null;
}
        }
}

and display in the visualforce page; 

<apex:outputfiled>
 
  • December 28, 2018
  • Like
  • 0
here i should get the account object record data in the from of the select list ??  is it possible ..
Scenario 2: i need to display the childrecords (say contact records)in the another selectlist , on selecting the parent record...
how is it possible in salesforce??
 
  • December 27, 2018
  • Like
  • 0
hi , i have created a visual force page as and used the stylesheet tag:

<apex:page >
  
   <html>
 

   <apex:stylesheet value="{!URLFOR($Resource.test,'mystyle/style1.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.test,'style1.css')}"/>
       
       
       <link rel="stylesheet"  type="text/css" href="0817F000001YqmZ/style1.css"/>
      <p> this is a 1st  css page</p>
      
      <h1> this is  Second css </h1>

   </html>
</apex:page>



and create a  css file in notepad and saved as  style1.css .

 p{
   color:red ;
}

and created  a  another css file in notepad and saved as  style2.css .

 h1{
   color:blue;
}

then after that created a folder name as mystyle and included the two css files and , made as the zip  file  and included into the static resource.

then when calling in the salesforce v.f page the styles are not effecting ?? why?? any error??  

cant we use the css file without including in the static resource???

 is this correct or i should use the anyalternate procedure..
 
  • December 20, 2018
  • Like
  • 0
I have a requirement that , i had created a customobject __name , the save option should enable until the record has entered some value, and  edit button should be in the disable mode.

 in secnario 2: for edit the record, the save button should not be enable untill the record value is entered, if it is not entered , disable mode.. how to work with this in salesforce .. any example will be helpful
 
  • December 19, 2018
  • Like
  • 0
Copy and paste the below code  in your visualforce page:
in the block a i should get the list of custom parent record in block 1 with selection of parent record, child records should have to  display in the block 2. and new and update and delete option should have to include init 
 
<apex:page sidebar="false">
  
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <style>
  
   
    
    /* On small screens, set height to 'auto' for sidenav and grid */
    @media screen and (max-width: 767px) {
      .sidenav {
        height: auto;
        padding: 15px;
      }
      .row.content {height:auto;} 
    }
    
    
    
    .tab {
   
    border: 1px solid #ccc;
    background-color: #f1f1f1;
    width: 100%;
    height: 150px;
    padding-right:350px;
}


   
  </style>
</head>
<body>

    


  
<div class="container-fluid text-center">    
  <div class="row content">
    
    
    <div>
    <div class="col-sm-8 text-left"> 
     <h1>Parent Object:</h1> <br/>
           
           <div class="tab">
                  
                  
  
</div>  
 
 <br/>
 
<div  class="button1"  align="center">
     
      <button class="tablinks" >New</button>
  <button class="tablinks" >update</button>
  <button class="tablinks" >Delete </button>
     
     </div>
     
     <br/>
<h1>Child Object:</h1> 

    <div class="tab">
                  
                  
  
</div>
<br/>

<div  class="button1"  align="center">
     
     
  <button class="tablinks" >New </button>
  <button class="tablinks" >update</button>
  <button class="tablinks" >Delete</button>
     
     </div>  
     <br/>
</div>



    </div>
    
    
   

    
    
   
    
  </div>
</div>



</body>
</html>

</apex:page>
  • December 19, 2018
  • Like
  • 0
scenario
Here i had created two custom objects, university__c as parent, and student __c as child, and created some records with custom fileds, and created the masterdetail relation shipo..  so i should have to display in this format.. how can i proceed .. on clicking of uniersity__C should have get their related students, in the same page should have to add the new student, edit and delete and for university also same scenario 
  • December 19, 2018
  • Like
  • 0
Error: Compile Error:
Recepient_information__r.Name from Recepient_information__c)FROM Company_Information__c
^
ERROR at Row:1:Column:56
Didn't understand relationship 'Recepient_information__c' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 6 column 16


 hi i had created a  two custom objects of recepient(child) and companyinformation(parent), and created a masterdetail relationship in child object that is receipent object . if iam querying parent and child records it is showing error , may i know why?? 
 the code is as folows.
public class sample2
{    
    public List<Company_Information__c> acct {get;set;}
    public sample2()
    {
        acct = [SELECT Name,phone__C,(select Recepient_information__r.Name from Recepient_information__c)FROM Company_Information__c ];
    }    
}



visualforce page code is:

<apex:page controller="sample2">
    <script>
function toggleContacts(className){
    elem = document.getElementsByClassName(className)[0];
    if(elem.style.display == 'none')
        elem.style.display = 'block';
    else
        elem.style.display = 'none';
}
</script>

<apex:form >

    <apex:repeat value="{!acct}" var="a">

        <apex:pageBlock title="{!a.Name}">
            <apex:pageBlockButtons location="top">
                <input type="button" onclick="toggleContacts('tbl-{!a.id}');" value="Show/Hide contacts" class="btn" /> 
            </apex:pageBlockButtons>
            <apex:pageBlockSection >
                <apex:outputField value="{!a.Phone__c}"/>
            </apex:pageBlockSection>

            <apex:outputPanel styleClass="tbl-{!a.id}" style="display:none;">
            <apex:pageBlockTable value="{!a.Recepient_information__c}" var="c">
                <apex:facet name="header">Contacts</apex:facet>
                <apex:column value="{!c.Name}"/>
            </apex:pageBlockTable>
            </apex:outputPanel>
        </apex:pageBlock>

    </apex:repeat>

</apex:form>
</apex:page>

12on click should have to display the records and needs edit the contact name and account name
 
  • December 18, 2018
  • Like
  • 0
<apex:page standardController="Companies__c" sidebar="false">

  <apex:sectionHeader title="Company Information" help="Help for this page" />
  <apex:form >
  
     <apex:pageBlock title=" cmp Information" tabStyle="Account" >
         
         
           
             <apex:pageBlockButtons > 
                       <apex:commandButton value=" Save " action="{!save}" />
                      <apex:commandButton value=" Cancel " action="{!cancel}" />
               
               
              </apex:pageBlockButtons>
       
              
      
           <apex:pageBlockSection columns="2" >
           
            <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Company Name" />
                    <apex:inputfield value="{!Companies__c.name}" /> 
                </apex:pageBlockSectionItem>
                
                
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Company phone" />
                    <apex:inputText value="{!Companies__c.cmpanies_phone__c}" /> 
                </apex:pageBlockSectionItem>
                
                
          
               
            
                  
          
             
                 
                 
                
               
                 
          
           
               
               
                 
           </apex:pageBlockSection>
                  
                  
                  
                      <!--contact Information-->
                      
                      
                        <apex:pageBlockSection columns="2" title="Contact Information">
           
            <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Contact Person"/>
                    <apex:inputfield value="{!Companies__c.Contact_Person__c}" /> 
                </apex:pageBlockSectionItem>
                
                
             
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Contact's Email Address" />
                    <apex:inputText value="{!Companies__c.Contact_s_Email_Address__c}" /> 
                </apex:pageBlockSectionItem>
          
               
              
     
               
                 
           </apex:pageBlockSection>
                  
                  
            
           
        
   
           
        
        
       
     
     </apex:pageBlock>
  
  </apex:form>
  
</apex:page>
  i had created a  custom filed and a custom object and i had created a visualforce page, if  i had saved the record ,it is not getting save , may i know the error in that???
  • December 17, 2018
  • Like
  • 0
i have gone through the different types of sanboxes and their time intervals all  from the documentations .. now my doudt is why we will go for refresh time  the sanbox, can any body explain with the simple example,, i have gone through the document of developer guide.
 I need a  real time example , when and why it is done , with a small scenario.. general example ,,??? 

 
  • December 11, 2018
  • Like
  • 0
can anybody explain with a example where this scenario is used  in a simple manner,  i have gone through differnt examples , bt iam unable to understand it >>ApexPages.currentPage().getParameters().get('recordId') 
i had gone through developer guide and other things, i need the a small example what really the metadata is with an example , of simple 
thanks and regards
public class Test {

public static void main(String[] args)
{
integer  a = 20;

 system.debug(a);
}
}

how to execute in the anonymous window:??


 i have tried with this code ,it was working fine;;public class Test {


  public class test{
public static void main()
{
integer  a = 20;

 system.debug(a);
}
}

 in anonymous window:test.main(); -- i got 20 . but trying to execute with javacode in salesforce
  • March 26, 2019
  • Like
  • 0
Is it possible  to make the ajax callouts from the salesforce to the external application , and fetch the data .. if so how will be the procedure, any live small example from the 3rd party application .. 

thanks ..
  • March 18, 2019
  • Like
  • 0
 Hi , i had added the alert.js file in saticresource as alert.

alert.js:-
<script>
function myFunction() {
  alert("I am an alert box!");
}
</script>



 and in the Visualforce page :

 
<apex:page >
  
      <apex:includeScript value="{!$Resource.alert}"/>
     
  
   <apex:includeScript value="{!URLFOR($Resource.alert, 'alert')}"/>
  
  
  
  
  <apex:stylesheet value="{!URLFOR($Resource.alert, 'alert')}"/>
  
  <button onclick="myFunction()">Try it</button>
</apex:page>


functionality is not getting work .. thanks 
 
  • March 18, 2019
  • Like
  • 0
Hi Everyone,

I am trying to test out web server OAuth flow between 2 different salesforce org but i am unable to get authorization code. I already have connected app set up done in my Target org and i am using Callback URL as https://[MY Domain Name].salesforce.com/services/oauth2/token and i am making a post request first to Authorization end point but when i try to check the response body in debug i get unsupported_Respose_type error. Below is code for gettting Auth code

public class getCaseFromTarget {

   String clientid = My Client Id;
   String csecret = My Client Secret;
   String auth_url = 'https://[MY Domain Name]..salesforce.com/services/oauth2/authorize';
   String response_type = 'code';
   String callback ='https://[MY Domain  Name].salesforce.com/services/oauth2/token';
   String callback_URL = EncodingUtil.urlEncode(callback, 'UTF-8');

   public class deserializeResponse {
        public String access_token;
   }
   public String ReturnAccessToken() {
       String reqbody = '?response_type=code&client_id='+cid+'&redirect_uri='+callback_URL; 
       Http h = new Http();
       HttpRequest req1 = new HttpRequest();
       req1.setBody(reqbody);
       req1.setMethod('POST');    
       req1.setEndpoint(auth_url);
       req1.setHeader('Content-Type', 'application/x-www-form-urlencoded');
       HttpResponse res = h.send(req1);
       System.debug( '**********'+res.getBody() );
       return null;/// please ignore this part. it's just temporary
   }
}

When i form the URL Manually and paste it in browser i can see the Authorization screen but getting invalid grant type error after that. I am not sure what i am doing wrong here.

I want to know if it possible to get authorization and token in same apex call implicitly. Also it would be helpful if someone can provode some sample code for this as most of the blogs or post are talking about Username-Password Flow which i don't want to use for this purpose. Thanks in Advance
public class Personal_Information{
     
      
      
       public list<Personal_Information__c> perinfo{get;set;}
  
   
   
     
       public void  Insertrecord(string name){
       
       
          
            
              list<Personal_Information__c> listperinfo = new list<Personal_Information__c>();
             
                 Personal_Information__c  perinfo = new Personal_Information__c();
          
          
         perinfo .name = name;
          
          
         listperinfo.add(perinfo );
          
          
          
           
           
           if(! listperinfo.isEmpty()){
           
           
           
              insert listperinfo;
           
           }
          
          
          
       
       }
    
  
  
  
  }





visualforce page:



<apex:page controller="Personal_Information" sidebar="false">
  
  
    <html>
      
        <head>
        
         <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
        </head>
    
      
    
     <body>
     
     
     
        <div class="col-sm-3">
     <div class="form-group">
      <label for="usr">Name:</label>
      <input type="text" class="form-control" id="usr" value ="{!name}" />
    </div>
     </div>
     
     
     <br/>
     
      <button type="button" class="btn btn-success"   action ="{!Insertrecord}" >Save</button>
     
     
     </body>
    
    
 
    
    </html>
  
   
</apex:page>

without use of the salesforce standared fileds, records should have to insert using a custom button , it was not  getting save , any wrong with this??


 
  • February 08, 2019
  • Like
  • 0
hi i had performed the rest callouts, by authorizing the endpoint url into the remotesite settings and later in the anonymous window i had copied and pasted the code form the trailhead..
 the request was sucessfull, and got the response..
the issue was after the selection of the debuglog checkbox the data is not displayed here;
the code is 
Http http = new Http();
HttpRequest request = new HttpRequest();
request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');
request.setMethod('GET');
HttpResponse response = http.send(request);
// If the request is successful, parse the JSON response.
if (response.getStatusCode() == 200) {
    // Deserialize the JSON string into collections of primitive data types.
    Map<String, Object> results = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());
    // Cast the values in the 'animals' key as a list
    List<Object> animals = (List<Object>) results.get('animals');
    System.debug('Received the following animals:');
    for (Object animal: animals) {
        System.debug(animal);
    }
}
the screnshots are shown belowgot responseDebug log is Empty
  • February 07, 2019
  • Like
  • 0
public class cmpinfocheck{
 
 
  
  
   public  list<Company_Information__c> cmpinfo{get;set;}
   
   public string empname{get;set;}
   
   
    public void cmpdata(){
     
     
     cmpinfo = new list<Company_Information__c>();
      
      
      Company_Information__c cm = new Company_Information__c();
      
      cm.name= empname;
       
     
      cmpinfo.add(cm);
        
        
     insert cmpinfo;
      
    }
    
    
    
    
    
 
 
 }
 
<apex:page controller="cmpinfocheck">
     
  <apex:form>
 <html>
 <head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head> 
  
   <script>

  function save(){
//how to deal with this type of scenario

};

</script>
  
 
   
   <body>
   
    <input type="text"  value="{!empname}"/>
    
   <button onclick="save()"> save</button>
   
   </body>
 
 </html>
 </apex:form>
</apex:page>

 
  • February 06, 2019
  • Like
  • 0
iam using the bootstarp buttons in the salesforce-- button it was not effection eventhough used the libraries ... 
 in need the default button colurs for the all the buttons in the visualforce page... what should have to be include 

 
<apex:page >
 <html>
 
 <head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>


<body>

<div class="container">
  <h2>Button Styles</h2>
  <button type="button" class="btn">Basic</button>
  <button type="button" class="btn btn-default">Default</button>
  <button type="button" class="btn btn-primary">Primary</button>
  <button type="button" class="btn btn-success">Success</button>
  <button type="button" class="btn btn-info">Info</button>
  <button type="button" class="btn btn-warning">Warning</button>
  <button type="button" class="btn btn-danger">Danger</button>
  <button type="button" class="btn btn-link">Link</button>      
</div>

</body>


 </html>
</apex:page>

 
  • February 01, 2019
  • Like
  • 0
public class BusScheduleCache {

    private Cache.OrgPartition part;
    
      
      
       public BusScheduleCache (){
       
        
        Cache.OrgPartition part = cache.org.getpartition('local.BusSchedule');
        
     
       
       }
       
       
       
       
        public void  putSchedule(String busLine, Time[] schedule){
     
      
      
       Part.put(busLine, '12'); 
       
     //  Part.put(schedule, {5,6,7});   
        
        
        }
        
        
        
       public getSchedule(String busLine){
        
        
        
if (cachedvalue!= null) {
    
    return null;
    
} else {
    
      return null;
}
        }
}

and display in the visualforce page; 

<apex:outputfiled>
 
  • December 28, 2018
  • Like
  • 0
here i should get the account object record data in the from of the select list ??  is it possible ..
Scenario 2: i need to display the childrecords (say contact records)in the another selectlist , on selecting the parent record...
how is it possible in salesforce??
 
  • December 27, 2018
  • Like
  • 0
<apex:page standardController="Companies__c" sidebar="false">

  <apex:sectionHeader title="Company Information" help="Help for this page" />
  <apex:form >
  
     <apex:pageBlock title=" cmp Information" tabStyle="Account" >
         
         
           
             <apex:pageBlockButtons > 
                       <apex:commandButton value=" Save " action="{!save}" />
                      <apex:commandButton value=" Cancel " action="{!cancel}" />
               
               
              </apex:pageBlockButtons>
       
              
      
           <apex:pageBlockSection columns="2" >
           
            <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Company Name" />
                    <apex:inputfield value="{!Companies__c.name}" /> 
                </apex:pageBlockSectionItem>
                
                
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Company phone" />
                    <apex:inputText value="{!Companies__c.cmpanies_phone__c}" /> 
                </apex:pageBlockSectionItem>
                
                
          
               
            
                  
          
             
                 
                 
                
               
                 
          
           
               
               
                 
           </apex:pageBlockSection>
                  
                  
                  
                      <!--contact Information-->
                      
                      
                        <apex:pageBlockSection columns="2" title="Contact Information">
           
            <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Contact Person"/>
                    <apex:inputfield value="{!Companies__c.Contact_Person__c}" /> 
                </apex:pageBlockSectionItem>
                
                
             
                 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Contact's Email Address" />
                    <apex:inputText value="{!Companies__c.Contact_s_Email_Address__c}" /> 
                </apex:pageBlockSectionItem>
          
               
              
     
               
                 
           </apex:pageBlockSection>
                  
                  
            
           
        
   
           
        
        
       
     
     </apex:pageBlock>
  
  </apex:form>
  
</apex:page>
  i had created a  custom filed and a custom object and i had created a visualforce page, if  i had saved the record ,it is not getting save , may i know the error in that???
  • December 17, 2018
  • Like
  • 0