• Sarma Duvvuri
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 33
    Replies
Hi,

Can anyone tell me,  Can we display the list of queues and public groups assigned to the particular user in report or dashboard?

Thanks in Advance.
Sarma
Hi All,

i want to assign the case to particualt queue based on code. 
Code is DEL, I can assign that case to the queue name which contains DEL as a admin

Please help for validation rule..

Thnaks,
Sarma
 
Hi All,

I have One Parent Object- Case and Child Object- Case Events. For every status change in case (like new, Pend, Reject) event is created in case events. if status changed 3 times 3 evenmts created in case events object.

Now we have one filed (Time) in case event i want to get that field value in case.

Please Help me how to proceed.

Thanks,
Sarma
Hi All,

When case status is updated, Total duration hours should be displayed in sub total column of report. Can any one please help me how to write trigger for this scenario. Its very urgent

Thanks In Advance.

Sarma
Hi All,

Please provide any sample code of Batch class to fetch the records based on time and date.

Thanks,
Sarma
Hi All,

Kindly provide the sample test class for Creating Installation Case records based on Application Status

Thanks & Regards,
Sarma
Hi All,

I have imported the list of accounts in CSV formate in visualforce page. i have 2 tasks.
1. I want to upload only 5 account records if it is more than 5 it should show the error message
2. What are the records i got in visual force page should save in account object once i click on save button in visual force page. please suggest.

code is below..

VisualforcePage:
<apex:page controller="importDataFromCSVController">
    <apex:form >
        <apex:pagemessages />
        <apex:pageBlock >
            <apex:pageBlockSection > 
                  <apex:inputFile value="{!csvFileBody}"  filename="{!csvAsString}"/>
                  <apex:commandButton value="Upload" action="{!importCSVFile}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock >
           <apex:pageblocktable value="{!accList}" var="acc">
              <apex:column value="{!acc.name}" />
              <apex:column value="{!acc.AccountNumber}" />
              <apex:column value="{!acc.Type}" />
              <apex:column value="{!acc.Accountsource}" />
              <apex:column value="{!acc.Industry }" />
        </apex:pageblocktable>
     </apex:pageBlock>
   </apex:form>
</apex:page>

Apex class:
public class importDataFromCSVController {
public Blob csvFileBody{get;set;}
public string csvAsString{get;set;}
public String[] csvFileLines{get;set;}
public List<account> acclist{get;set;}
  public importDataFromCSVController(){
    csvFileLines = new String[]{};
    acclist = New List<Account>(); 
  }
  
  public void importCSVFile(){
       try{      
        
           csvAsString = csvFileBody.toString();
           csvFileLines = csvAsString.split('\n'); 
            
           for(Integer i=1;i<csvFileLines.size();i++){
               Account accObj = new Account() ;
               string[] csvRecordData = csvFileLines[i].split(',');
               accObj.name = csvRecordData[0] ;             
               accObj.accountnumber = csvRecordData[1];
               accObj.Type = csvRecordData[2];
               accObj.AccountSource = csvRecordData[3];   
               accObj.Industry = csvRecordData[4];                                                                             
               acclist.add(accObj);   
           }
        //insert acclist;
        }
        catch (Exception e)
        {
            ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR,'Please upload the csv format file');
            ApexPages.addMessage(errorMessage);
        }  
  }
}




 
Hi All,

Can anyone ell me how to convert the lead from Web to Lead form to Direct account and contact please.

Its Urgent.

Sarma
Hi,

I am not able to run the batch for the below quesry.

i am getting below error messages after modifications also. kindly help.
1. First error: Only variable references are allowed in dynamic SOQL/SOSL.
2. First error: unexpected token: '='
3. IF i mention IN instead of = i got error message like First error: unexpected token: 'IN'
4. First error: expecting a colon, found 'NULLStatus__c'
5.First error: Too many query rows: 50001 (Main Error)

I want to  get all the ACTIVE status customers from orders.

Code:
global with sharing class Batch_ProductVolumeTarget_Stats implements Database.Batchable<sObject>
{
  public class X_Exception extends Exception{}

  global Database.QueryLocator start(Database.BatchableContext BC)
  {
    string  strQuery =
      ' select  Id'  +
      ' from     Order__c ' +
      ' where    Customer__C= NULL';
      
    return Database.getQueryLocator(strQuery);
  }

Regards,
Sarma
Hi All,

How to do lead conversion without creating an opportunity. (Only account and contact has to be created)

If the account is already exists contact detailes has to updated to that exisiting account and if the details are already there in salesforce and different from the requirement, we need to update those details in account and contacts.

Lead Conversion Code:

Trigger web2LeadConvert on Lead (after Update) {
     LeadStatus convertStatus = [
          select MasterLabel
          from LeadStatus
          where IsConverted = true 
          limit 1
     ];
     List<Database.LeadConvert> leadConverts = new List<Database.LeadConvert>();

     for (Lead lead: Trigger.new) {
          if (!lead.isConverted && lead.Status == 'Qualified') {
               Database.LeadConvert lc = new Database.LeadConvert();
              
               
               lc.setLeadId(lead.Id);
              
               lc.setConvertedStatus(convertStatus.MasterLabel);
               
               leadConverts.add(lc);
          }
     }

     if (!leadConverts.isEmpty()) {
          List<Database.LeadConvertResult> lcr = Database.convertLead(leadConverts);
     }

Please help to slove above problems.

Regards,
Sarma