• Jack A 2
  • NEWBIE
  • 20 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 5
    Replies
I am trying to chain job but the inner class code is not executing.
public class MyQueueable1 implements Queueable {

    Public Static list < Account > acclist = new list < Account > ();
    public MyQueueable1() {

    }
    public void execute(QueueableContext context) {

        System.enqueueJob(new MyQueueable2());
    }
    public class MyQueueable2 implements Queueable {

        public MyQueueable2() {

        }
        public void execute(QueueableContext context) {
            List < Account > a = [SELECT Id, Name
                                  FROM Account WHERE Id =: acclist];
        }
    }
}

 
I am trying to adjust the content in two columns but not able to do, I want them in two column with a bit of space b/w them.
 
<aura:component implements="force:lightningQuickActionWithoutHeader" >
   <div class="slds-modal__header">
     <h2 id="header43" class="slds-text-heading--medium">Print Chart</h2>
   </div>
   <!--If you want to customise header then use 'implements ="force:lightningQuickActionWithoutHeader"' -->
   <!--/**

   **/-->
   <span> Select Information to print</span><br></br>
   <span>Select:</span>

    <ui:button label="All" />
    <ui:button label="None" />

    <fieldset class="slds-form--compound">
    <div class="slds-form-element">
       <div class="slds-form-element slds-size--1-of-2">   
           <span class="slds-checkbox">
           <input type="checkbox" name="options" id="checkbox-195" checked="" />             <label class="slds-checkbox__label" for="checkbox-195">
             <span class="slds-checkbox--faux"></span>
             <span class="slds-form-element__label">Patient </span>
           </label>
           </span>
           <span class="slds-checkbox">
             <input type="checkbox" name="options" id="checkbox-194" checked="" />
             <label class="slds-checkbox__label" for="checkbox-194">
             <span class="slds-checkbox--faux"></span>
             <span class="slds-form-element__label">Patient</span>
             </label>
           </span>
       </div>
     </div>
  </fieldset>
     <div class="slds-form-element">

          <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-193" checked="" />
            <label class="slds-checkbox__label" for="checkbox-193">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Flowsheet</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-192" checked="" />
            <label class="slds-checkbox__label" for="checkbox-192">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label"> selected</span>
            </label>
            </span>
          </div>

         <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-191" checked="" />
            <label class="slds-checkbox__label" for="checkbox-191">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Checkbox Label</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-190" checked="" />
            <label class="slds-checkbox__label" for="checkbox-190">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Checkbox Label</span>
            </label>
            </span>
         </div>

         <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-180" checked="" />
            <label class="slds-checkbox__label" for="checkbox-180">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Di</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-181" checked="" />
            <label class="slds-checkbox__label" for="checkbox-181">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Al</span>
            </label>
            </span>
         </div>

         <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-182" checked="" />
            <label class="slds-checkbox__label" for="checkbox-182">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Medi</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-183" checked="" />
            <label class="slds-checkbox__label" for="checkbox-183">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label"> availavle</span>
            </label>
            </span>
         </div>

        <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-184" checked="" />
            <label class="slds-checkbox__label" for="checkbox-184">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Imm</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-185" checked="" />
            <label class="slds-checkbox__label" for="checkbox-185">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Social history</span>
            </label>
            </span>
         </div>

        <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-186" checked="" />
            <label class="slds-checkbox__label" for="checkbox-186">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Past history</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-187" checked="" />
            <label class="slds-checkbox__label" for="checkbox-187">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">history</span>
            </label>
            </span>
         </div>

       <div class="slds-grid slds-wrap">  
            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-188" checked="" />
            <label class="slds-checkbox__label" for="checkbox-188">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">Advance directives</span>
            </label>
            </span>

            <span class="slds-checkbox">
            <input type="checkbox" name="options" id="checkbox-189" checked="" />
            <label class="slds-checkbox__label" for="checkbox-189">
            <span class="slds-checkbox--faux"></span>
            <span class="slds-form-element__label">No notes selected</span>
            </label>
            </span>
       </div>

    </div>
         <div class="slds-modal__footer">
          <button class="slds-button slds-button--neutral">Cancel</button>
          <button class="slds-button slds-button--brand">Save</button>
        </div>

    </aura:component>

User-added image
I have a custom object Review__c and it has MD relationship to contact.
I have checkbox and text field in Review__c object.

Now from VF page I am trying to insert data into custom object fields.

I am having difficulty writing controller class.
 
VF Page:

Have there been any significant changes
<br></br>
<apex:pageblocksection >

            <apex:inputcheckbox value="{!chkBx}" label="Yes"  id="Y" onchange="return confirmDisbaled(this.checked, '{!$Component.N}','{!$Component.cntry}');"> 
                <apex:actionSupport event="onchange" rerender="thePanel" action="{!click}"/>    
            </apex:inputcheckbox> 
           <apex:inputCheckbox label="No" id="N" onchange="return confirmDisbaled(this.checked, '{!$Component.Y}','{!$Component.cntry}');"/>  
            </apex:pageblocksection>

If yes, 
<br></br>
<apex:pageblocksection >
<apex:outputPanel id="thePanel">    
              <apex:pageBlockSectionItem rendered="{!displayInputputText}">
                    <apex:outputLabel value="Input Text" />
                    <apex:inputText value="{!input}"/>  
                </apex:pageBlockSectionItem>
            </apex:outputPanel>
</apex:pageblocksection>




public with sharing class VFTestController { 
     public VFTestController() {

     }  
      
     public Review__c r{get; set;}
     public Review__c setr(Review__c view){
     this.r=view;
     return r;
     }
     public VFTestController(ApexPages.StandardController controller) {
     
     }
     public Id viewid{get;set;}
     Id id = apexpages.currentpage().getparameters().get('id');
 

     public pagereference save(){
     Review__c re  = new Review__c();
     re.Would_you_like_to_receive_a_complimentar__c=r.Would_you_like_to_receive_a_complimentar__c;

     insert re;
     Pagereference pg = new Pagereference('/' + re.id);
     pg.setredirect(true);
     return pg;
     }

    public Boolean displayInputputText{get;set;}
    public Boolean chkBx{get;set;}
    public String input{get;set;}       
    public PageReference click(){    
         if(chkBx){
             displayInputputText = true;
         }
         else {
             displayInputputText = false;
         }
         return null;   
    }

 
I have multiple 'yes' 'no' checkbox on VF page and I am trying to display text field when 'Yes' checkbox is clicked but not in all case.
I need to display text field for some of the checkbox. How to make use of this code and identify which checkbox is selected and based
on that I can display the textbox.
<apex:pageblocksection >

            <apex:inputcheckbox value="{!chkBx}" label="Yes"> 
                <apex:actionSupport event="onchange" rerender="thePanel" action="{!click}"/>    
            </apex:inputcheckbox> 
           <apex:inputCheckbox label="No"/>  
</apex:pageblocksection>




<apex:pageblocksection >
 <apex:outputPanel id="thePanel">    
                <apex:pageBlockSectionItem rendered="{!displayInputputText}">
                    <apex:outputLabel value="Input Text" />
                    <apex:inputText value="{!input}"/>  
                </apex:pageBlockSectionItem>
            </apex:outputPanel>
</apex:pageblocksection>
 
public Boolean displayInputputText{get;set;}
    public Boolean chkBx{get;set;}
    public String input{get;set;}       
    public PageReference click(){    
         if(chkBx){
             displayInputputText = true;
         }
         else{
             displayInputputText = false;
         }
         return null;

 
I have a visualforce page that contains some Questionnaire and for that I have created yes and no inputcheckbox and corresponding to that checkbox on visualforce page I have fields in my custom object. Now what I want is that when user check the checkbox on the visualforce page then I want to be checked the checkbox in my field also.
 
<apex:page sidebar="true" showHeader="false" standardStylesheets="false"> 

  5. Have you paid off any existing debt in the last 12 months?<br></br>
 <apex:pageBlockSection >
 <apex:inputCheckbox label="Yes" />
 <apex:inputCheckbox label="No" />
 </apex:pageBlockSection>
<apex:commandButton value="Submit" action="{!save}"/>
</apex:page>

 
I am trying to write a trigger that will copy the same attachment to all related contact when we insert an attachment to Account Object.
trigger CopyAttachmentsToCon on Attachment (after insert) {

    Set<Id> AccountIds = new Set<Id>();
    for(Attachment file : Trigger.new) {
     
        if(file.ParentId.getSObjectType() == Account.getSObjectType()) {
            AccountIds.add(file.ParentId);
        }
    }
Now how to get map of all the related contact of coresponding Account with Attachment?
 
I have already edited the page layout of the custom object but still Notes & Attachments related list is not displaying to existing custom objects?
I want to count how many Contact has value under description field using for loop. Similarly if Contact object has custom field then how to count those field which has some value
SELECT COUNT() Amo__c FROM Contact WHERE Description != null
The above query is not working
For Example:
for(Contact con : [Select Id,Salary__c From Contact Where AccountId = :accId Limit 100]){
            System.debug('Check min'+con.Salary__c);
 }
Here I am getting all the salary from contact, now how to compare those and show minimum of them.
FYI:  I know using AggregateResult is more efficient.
 
I am trying to chain job but the inner class code is not executing.
public class MyQueueable1 implements Queueable {

    Public Static list < Account > acclist = new list < Account > ();
    public MyQueueable1() {

    }
    public void execute(QueueableContext context) {

        System.enqueueJob(new MyQueueable2());
    }
    public class MyQueueable2 implements Queueable {

        public MyQueueable2() {

        }
        public void execute(QueueableContext context) {
            List < Account > a = [SELECT Id, Name
                                  FROM Account WHERE Id =: acclist];
        }
    }
}

 
I have a visualforce page that contains some Questionnaire and for that I have created yes and no inputcheckbox and corresponding to that checkbox on visualforce page I have fields in my custom object. Now what I want is that when user check the checkbox on the visualforce page then I want to be checked the checkbox in my field also.
 
<apex:page sidebar="true" showHeader="false" standardStylesheets="false"> 

  5. Have you paid off any existing debt in the last 12 months?<br></br>
 <apex:pageBlockSection >
 <apex:inputCheckbox label="Yes" />
 <apex:inputCheckbox label="No" />
 </apex:pageBlockSection>
<apex:commandButton value="Submit" action="{!save}"/>
</apex:page>

 
I want to count how many Contact has value under description field using for loop. Similarly if Contact object has custom field then how to count those field which has some value
SELECT COUNT() Amo__c FROM Contact WHERE Description != null
The above query is not working
For Example:
for(Contact con : [Select Id,Salary__c From Contact Where AccountId = :accId Limit 100]){
            System.debug('Check min'+con.Salary__c);
 }
Here I am getting all the salary from contact, now how to compare those and show minimum of them.
FYI:  I know using AggregateResult is more efficient.