• Rohit Singh 136
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi Experts,
<apex:page standardController="Account">  <apex:form >
<apex:pageBlock >

<apex:pageBlockSection columns="3">
 
<apex:inputField value="{!Account.customer_type__c}" required="false"/> 
<apex:inputField value="{!Account.A__c}" required="false"/>
<apex:inputField value="{!Potential__c}" required="false"/>
 

</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>


I have a requirement to show 3 fields in a column in page section. As per standard Salesforce page permission it’s allow us only 2 field in a single column. I wrote Visualforce page and imbedded in Standard page layout but it looks edit page.
Please help me, my primary objective is to show 3 field in Single column and I can see them in edit and detail page both.
I am using pre-built Event Monitoring Wave Dashboards to get Report exported by users, Dashboard adoptions and performance. When i saw dashboards for how often are dashboard used i found too much Row count.
Can any one explain what is this row count. Does it means row count in reports because as per my understanding I want to see how many time users visit particular dashboard.
Please advise.
User-added image
Hi, I have to update contacts deaily if a custom number field call_interval_count with number 1 if call_interval_c !=  null. 
My batch is below:
global class updatecontactworkflow implements Database.Batchable<SObject>, Database.Stateful{
             
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
        String query = 'Select Id, Call_Interval__c From contact WHERE Call_Interval__c != Null';
        system.debug(query);
        return Database.getQueryLocator(query);
    }
     
    global void execute(Database.BatchableContext BC, List<SObject> scope){
        for(contact obj : (contact[]) scope){
            if(obj.Call_Interval__c != Null){
               obj.Call_Alert_Count__c = 1;
              } else 
               obj.Call_Alert_Count__c = 1;
            }
        system.debug('list to be updated size  :: ' + scope.size());
        if(!scope.isEmpty())
        {
              update scope;
         }
     }

    global void finish(Database.BatchableContext BC){
    }
}

and test class is :
@isTest             
private class updatecontactworkflowTest 
{
    static testmethod void testbatch() 
    {
        Account acc = new Account(Name='Test Account');
        insert acc;
              
        List<contact> cons = new List<contact>();
        for (integer i=0; i<50; i++)
        {
            contact con = new contact();
            con.AccountId=acc.Id;
            con.Name='My contact'+i;
            con.Level__c ='C Level';
            con.Functional_Role__c = 'Opeartion';
            con.Title = 'CFO';
			con.Phone = '+441569172306';
			con.Email = 'na@na.com';
			con.Call_Alert_Count__c = '1';
			
            //con.LastActivityDate = System.today()+15;
            cons.add(con);
        }
        insert cons;
        
       Test.startTest();
           updatecontactworkflow  obj = new  updatecontactworkflow ();
           Database.executeBatch(obj, 200);
       Test.stopTest();

    }
}

Code Coverage is 46% (6/13). Please assist :)
Hi Experts,
<apex:page standardController="Account">  <apex:form >
<apex:pageBlock >

<apex:pageBlockSection columns="3">
 
<apex:inputField value="{!Account.customer_type__c}" required="false"/> 
<apex:inputField value="{!Account.A__c}" required="false"/>
<apex:inputField value="{!Potential__c}" required="false"/>
 

</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>


I have a requirement to show 3 fields in a column in page section. As per standard Salesforce page permission it’s allow us only 2 field in a single column. I wrote Visualforce page and imbedded in Standard page layout but it looks edit page.
Please help me, my primary objective is to show 3 field in Single column and I can see them in edit and detail page both.
Hi, I have to update contacts deaily if a custom number field call_interval_count with number 1 if call_interval_c !=  null. 
My batch is below:
global class updatecontactworkflow implements Database.Batchable<SObject>, Database.Stateful{
             
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
        String query = 'Select Id, Call_Interval__c From contact WHERE Call_Interval__c != Null';
        system.debug(query);
        return Database.getQueryLocator(query);
    }
     
    global void execute(Database.BatchableContext BC, List<SObject> scope){
        for(contact obj : (contact[]) scope){
            if(obj.Call_Interval__c != Null){
               obj.Call_Alert_Count__c = 1;
              } else 
               obj.Call_Alert_Count__c = 1;
            }
        system.debug('list to be updated size  :: ' + scope.size());
        if(!scope.isEmpty())
        {
              update scope;
         }
     }

    global void finish(Database.BatchableContext BC){
    }
}

and test class is :
@isTest             
private class updatecontactworkflowTest 
{
    static testmethod void testbatch() 
    {
        Account acc = new Account(Name='Test Account');
        insert acc;
              
        List<contact> cons = new List<contact>();
        for (integer i=0; i<50; i++)
        {
            contact con = new contact();
            con.AccountId=acc.Id;
            con.Name='My contact'+i;
            con.Level__c ='C Level';
            con.Functional_Role__c = 'Opeartion';
            con.Title = 'CFO';
			con.Phone = '+441569172306';
			con.Email = 'na@na.com';
			con.Call_Alert_Count__c = '1';
			
            //con.LastActivityDate = System.today()+15;
            cons.add(con);
        }
        insert cons;
        
       Test.startTest();
           updatecontactworkflow  obj = new  updatecontactworkflow ();
           Database.executeBatch(obj, 200);
       Test.stopTest();

    }
}

Code Coverage is 46% (6/13). Please assist :)
Hi, 

Is it possible to edit my own answer? I realized about an error on it and want to fix asap.
hi all,

I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable  to delete it
Any help would be highly appreciated

Its very urgent,
Thanks,