• Vinod Choudhary
  • NEWBIE
  • 95 Points
  • Member since 2016
  • DOTSQUARE TECHNOLOGIES INDIA PVT LTD


  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 27
    Replies
Hi am trying to display account and contact object as radio buttons 
when i click on account its record should display and
when i click on contact its record should display 
but am not getting the required output 
Below is my code 
where it is only displaying contact details 
please tell me where am going wrong
 
<apex:page controller="radio16">
    <apex:form >
        <apex:pageblock >
            <apex:selectRadio value="{!selectedRadio}">
                <apex:selectOption itemLabel="Account" itemValue="Accounts"/>
                <apex:selectOption itemLabel="Contact" itemValue="Contacts"/>
                <apex:actionSupport event="onclick" action="{!getDetails}" reRender="records"/>
            </apex:selectRadio>
            <apex:outputPanel id="records">
                <apex:pageblockSection Title="Records">
                    <apex:PageBlockTable value="{!acc}" var="a">
                        <apex:Column value="{!a.Name}"/>
                       
                    </apex:PageBlockTable>
                     <apex:PageBlockTable value="{!con}" var="c">
                        <apex:Column value="{!c.lastname}"/>
                       
                    </apex:PageBlockTable>
                </apex:pageblockSection>
            </apex:outputPanel>
        </apex:pageblock>
    </apex:form>
</apex:page>
 
public class radio16 {

    public String selectedRadio { get; set; }


    public List<Account> acc{get;set;}
    public List<Contact> con{get;set;}
   

   
    
    public PageReference getDetails(){
        acc = new  List<Account>();
        if(selectedRadio== 'Account'){
            acc = [SELECT name FROM Account limit 5];
        }
        else{
        con =new List<Contact>();
            con = [SELECT lastname FROM Contact limit 5];
        }
        return null;   
    }
}

 
I want to show chatter feeds on VF page, all the activities from users that I follow, how can I get all feeds from these users on my page.

Many Thanks,
Vinod
How we can show an input field half read-only and in another half field user can put value.
Like ...  <[some static value] [Here user can put value]>

Thanks
Vinod 

 
I am using Web to case HTML on my VF page. 
When a logged-in user submits that form a case is initiated automatically.

But the fields on Case "Account Name" and "Contact Name" is not populating.

I want to populate "Contact Name" field with the logged-in user who submits the case from VF page.

i have populated the "Web Email" field already.
On my web registred users have community user profile.

when community user login from there account the web to lead form fileds are not shows on form.

whiout logged in normal users can see the fileds.. but if user logged in.. fileds got disappers from from.

I have alredy give the object and filed level security permissions as weel domain level also.

please help !
Hi am trying to display account and contact object as radio buttons 
when i click on account its record should display and
when i click on contact its record should display 
but am not getting the required output 
Below is my code 
where it is only displaying contact details 
please tell me where am going wrong
 
<apex:page controller="radio16">
    <apex:form >
        <apex:pageblock >
            <apex:selectRadio value="{!selectedRadio}">
                <apex:selectOption itemLabel="Account" itemValue="Accounts"/>
                <apex:selectOption itemLabel="Contact" itemValue="Contacts"/>
                <apex:actionSupport event="onclick" action="{!getDetails}" reRender="records"/>
            </apex:selectRadio>
            <apex:outputPanel id="records">
                <apex:pageblockSection Title="Records">
                    <apex:PageBlockTable value="{!acc}" var="a">
                        <apex:Column value="{!a.Name}"/>
                       
                    </apex:PageBlockTable>
                     <apex:PageBlockTable value="{!con}" var="c">
                        <apex:Column value="{!c.lastname}"/>
                       
                    </apex:PageBlockTable>
                </apex:pageblockSection>
            </apex:outputPanel>
        </apex:pageblock>
    </apex:form>
</apex:page>
 
public class radio16 {

    public String selectedRadio { get; set; }


    public List<Account> acc{get;set;}
    public List<Contact> con{get;set;}
   

   
    
    public PageReference getDetails(){
        acc = new  List<Account>();
        if(selectedRadio== 'Account'){
            acc = [SELECT name FROM Account limit 5];
        }
        else{
        con =new List<Contact>();
            con = [SELECT lastname FROM Contact limit 5];
        }
        return null;   
    }
}

 
Hi,
I am new to the salesforce. Wanted to use inline edit with custom object recode but got stuck anybody please fhelp me.
Here is my code

Visual Force page
<apex:page controller="projectDisplay" >
    <apex:form >
    <apex:pageBlock >
     <apex:pageBlockButtons >
                 <apex:commandButton value="Save" action="{!SaveProject}"/>
             </apex:pageBlockButtons>
                 
            
        <apex:pageBlockSection title="Enter Project Details" collapsible="false" columns="1">
        
              <apex:inputField value="{!proj.name}"/>
              <apex:inputField value="{!proj.Status__c}"/>
              <apex:inputField value="{!proj.Start_Date__c}"/>
              <apex:inputField value="{!proj.ExpectedEndDate__c}"/>
              <apex:inputField value="{!proj.ActualEndDate__c}"/>
                   
        </apex:pageBlockSection>
        </apex:pageBlock>
            </apex:form>
  <apex:form >  
<apex:pageBlock mode="inlineEdit" >
    <apex:pageBlockSection title="Project Details" >
        
        <apex:pageBlockTable value="{!project}" var="p" align="center">
            <apex:column >
             <apex:commandLink action="{!deleteProject}" value="Del" >
                        <apex:param value="{!p.id}" name="column" assignTo="{!selectedLineDel}" ></apex:param>
                    </apex:commandLink>
            </apex:column>
            <apex:column >
             <apex:commandLink action="{!updateProject}" value="Edit" >
                        <apex:param value="{!p.id}" name="column" assignTo="{!selectedLineEdit}" ></apex:param>
                    </apex:commandLink>
            </apex:column>

               <apex:column value="{!p.name}"/>
             <apex:column value="{!p.Status__c}"/>
            <apex:column value="{!p.Start_Date__c}"/>
            <apex:column value="{!p.ExpectedEndDate__c}"/>
            <apex:column value="{!p.ActualEndDate__c}"/>
            
            </apex:pageBlockTable>        
       <!--  <apex:inlineEditSupport />
           <apex:commandButton value="Save All " action="{!QuickSave}"/>-->
        
        </apex:pageBlockSection>
    
    </apex:pageBlock>
    </apex:form>
</apex:page>

Apex Code

public class projectDisplay {
    
public project__c proj { get; set; }
public project__c project { get; set; }
 public List<Project__c> p ;
public String selectedLineDel{get;set;}  
public String selectedLineEdit{get;set;}
public String name{get;set;}
    
    public List<Project__c> getproject()
    {
        
        p=[select Name,ExpectedEndDate__c,ActualEndDate__c,Start_Date__c,Status__c from Project__c];
        return p;
    }
    
    //inline Delete
    public pageReference deleteProject()
    {
        Project__c pd=[select id from Project__c where id=:selectedLineDel];
        delete pd;
        return null;
    }
    //inline Update
    public pageReference updateProject()
    {
      List<project__c> edit=new List<Project__c>();
        List<Project__c> pedit=[select Name,ExpectedEndDate__c,ActualEndDate__c,Start_Date__c,Status__c from Project__c where id=:selectedLineedit];
       for(Project__c pe:pedit)
        {
           pe.Name=project.Name;
            pe.ActualEndDate__c=project.ActualEndDate__c;
            pe.ExpectedEndDate__c=project.ExpectedEndDate__c;
            pe.Start_Date__c=project.Start_Date__c;
            pe.Status__c=project.Status__c;
            edit.add(pe);
        }
        update edit;
        return null;
    }
    
    //constructor
    public projectDisplay(){
        proj=new Project__c();
    }
    
    //insert Project Record
    public pageReference saveProject()
    {
        
        insert proj;
        return null;
    }
        
}
 
Assume we have one field Status__c in Account of type free text.how to update that status__ c = success using quick actions in lightning.
I have removed it from homepage using app builder and it got removed from desktop, but still visible on SF1
Please help.
I have created a vf page in which data is coming from 3 objects.
Lets say A is the parent and B,C are child of A
When I go to A object detail page , A object standard edit and delete buttons are displaying along with B and C object edit/Delete button.

My requirement is we need to hide edit/delete button from related list (B and C object)

But we should able to edit B and C object after navigating to the customized edit page of A object.
I am Beginner, I have completed 2 units in Developer Beginner (Get Started with the Sales Force Platform and Develop Without code) on Feb-10th 2018, I am not able to complete the remaining units(Code with Sales Force Languages,Extend the Sales Force platform), Because I am not able to access DreamHouse app again. Please Help on this.
Hi All
I have one requirement,In detail page edit and save buttons are Standard buttons and page is standard page. I created one vf page in same detail page.So my detail page one standard page and one Custom Visualforce page is there.But i want to create Custom Visualforce page instead of standard Vf page and combine both Vf pages into one page.How it possible?plz help me
Hi Team,

After delete & update code not covered in trigger. please give me any idea about this requirement.

Trigger:
----------
trigger FinancialsCountTrigger on Financials__c (after insert, after update, after delete, after undelete) {
    
    if(checkRecursive.runOnce()){
        
        List<Account> updateAcc = new List<Account>();
        Set<Id> accid = new Set<Id>();
        
        Decimal totalRevenue;
        Decimal totalEBITDA;
        
        if(Trigger.isAfter && (Trigger.isInsert || Trigger.isUpdate || Trigger.isUndelete)){
            for(Financials__c fin : Trigger.New){
                if(fin.AccountName__c != null){
                    accid.add(fin.AccountName__c);
                }
            }
        }
        
        if(Trigger.isAfter && (Trigger.isUpdate || Trigger.isDelete)){
            for(Financials__c fin : Trigger.Old){
                if(fin.AccountName__c != null){
                    accid.add(fin.AccountName__c);
                    //system.debug('-----'+accid);
                }
            }
        }
        
            if(accid.size() > 0){
            List<Account> acclist = [select id,Name,Global_Revenue_Total__c,Global_EBITDA_B4_Total__c,
                                     (select id,Global_Revenue_Total__c,Global_EBITDA_B4_Total__c from Financial__r) from Account where id in :accid];
            
            for(Account acc : acclist){
                
                
                List<AggregateResult> aggres = [Select sum(Global_Revenue_Total__c)revtot,sum(Global_EBITDA_B4_Total__c)ebitdatot
                                                from Financials__c where AccountName__c=:acc.id and Year__c='FY-2017'];
                for(AggregateResult ag : aggres){
                    totalRevenue = (Decimal)ag.get('revtot');
                    totalEBITDA = (Decimal)ag.get('ebitdatot');
                }
                acc.Global_Revenue_Total__c = totalRevenue;
                acc.Global_EBITDA_B4_Total__c = totalEBITDA;
                updateAcc.add(acc);
            }
          }
          update updateAcc;
        
    }
    
}
Test Class
-----------------
@isTest
public class TestFinancialsCountTrigger {
    
    public static testMethod void financialCount(){
        
        Account acc = new Account(Name='3M Corporation',Industry='Conglomerate');
        insert acc;
        
        Account acc2 = new Account(Name='3M Corporation2',Industry='Conglomerate');
        insert acc2;
        
        Financials__c fin = new Financials__c(AccountName__c=acc.id,Name='Test',Year__c='FY-2017',Global_Revenue_Total__c=100,Global_EBITDA_Total__c=200);
        insert fin;
        
        Financials__c fin2 = new Financials__c(AccountName__c=acc2.id,Name='Test2',Year__c='FY-2017',Global_Revenue_Total__c=500,Global_EBITDA_Total__c=400);
        insert fin2;
        
        fin.Global_Revenue_Total__c = 500;
        update fin;
        delete fin;
                
        Test.startTest();
        
        List<Financials__c> finlist = [select id from Financials__c where AccountName__c = :acc.Id and Year__c='FY-2017'];
        delete finlist;
        
        Test.stopTest();
        
        
    }

}
Please give me reply any one......

Regards
Lakshmi

 
i want to integrate postgre sql with salesforce how to do this without using any application/tools? i want to integrate with coding .
Dear All,

I want to send an alert notification when overall organisation Async Apex Execution limit reached 70%of total limit(24hrs API Limit). Say if limit is 2500 and if system already exhausted 1750 of daily Async Apex Limit out of 2500 then any alert should be send to few persons notifying that your organisation limit of Async Apex Executions have reached 70% threshold.

I have done few research on the same but didn't get anything concrete. I saw blogs/documentation stating about Limit class and Limit methods but those are having limit method for future but no where I get any thing related to Async Apex Exceution Limits. In Limit Class I saw there are 2 mthods 'getAsyncCalls()' and 'getLimitAsyncCalls()' but both are related reserved for future use.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_limits.htm#apex_System_limits_getAsyncCalls
Kindly help me.

Any help will be greatly appreciated.

Many thanks in advance

Thanks & Regards,
Harjeet
I have a requirement that ananymous user who doesn't requre login to access a page, fills the details, saves to an object (custom, and it has lookup field  to contact) . For this I have done the below steps
  • Added Domain
  • Created new Site
  • Assigned the created VF page in to the list 'Site Visualforce Pages'
  • Activated the site
  • Gave perrmissions (RWA) to the custom object
But when I click on the page I got the following error
Authorization Required

You must first log in or register before accessing this page.
If you have forgotten your password, click Forgot Password to reset it.
We should directly access to the page without authorize, how can we do this?
Thanks,
 
Ex: I have 5 subject to give the marks and I should not give more than 100 marks for any subject
Is it just on my side, or is Trailhead extremely slow today?
My Background;
I am basically a mechanical engineer with almost 20 years of experience in the field of  engineering & sales in leading organizations producing high performance couplings and mechanical seals.
During last 2 to 3 years I have been using Salesforce CRM tools extensively in my company and am aware of the functionalities. I have used Salesforce for sales forecast, activity management, customer service console etc,

Salesforce Knowledge
My company had outsourced configuration and maintenance of salesforce and I was made salesforce super user. 
I have now learnt salesforce functions / configuration  (Apps, objects, validation, permission sets, profiles, reports & dashboards) .
Additionally, I have also learnt developer concepts like APEX class, SOQL, SOSL, Triggers etc., and am sure that I would be able to carry out jobs related to salesforce administrator / developer 

Computer programming knowledge
Though being a mechanical engineer, I was always interested in programming. Initially during my college days, I had completed course in Foxpro and later on learnt MS Access and Visual Basic. Additionally, I have also learnt Java through online course. During my tenure of work, I have designed number of MS Access programs, which are being used even today in my previous companies. 

Future interest / passion   
I am now looking at opportunities as a Salesforce administrator / developer where I can exhibit my logical reasoning skills and at the same time use my extensive work experience.
From this Salesforce community, I would require suggestions / advice on how I can go forward.
Hello everyone ,
I created a email template ,in this email template ,i set some merge fields ,they are reference from two object 
what i want to do is using this emai template  to send email via apex ,i have tried the SingleEmailMessage  class and i know i can set the value of merge field throughout the whatid ,
the problem is that i  can only set the whatid with only one vlaue ,this means the merge fields in email template can only receive the value from one object,which will cause some merge fields without values

so ,can anybody help me to resolve this problem? anys sugguestions would be appreciate, thanks.
  • February 02, 2018
  • Like
  • 0