• ss123
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 27
    Replies

All contacts from Account name =0017000000qz98bAAA with no case attched to them will be deleted

it is timing out

 

code for query is in following message

 

purge code not working in production but it is working in Full sandbox

 

 

 

 

 

SELECT Id FROM Contact WHERE CreatedDate <=:startDate  AND AccountId = '0017000000qz98bAAA' AND  id not in (select ContactId from Case) LIMIT 10000]

  • October 17, 2013
  • Like
  • 0
public  class DeleteContactWithNoCase {
// Intialization Variables 
    public contact con{get;set;}
    public DateTime startDate{get;set;}
    public DateTime EndDate{get;set;}
    public string message{get;set;}
//Setting Up Constructor 
public DeleteContactWithNoCase(ApexPages.StandardController controller) {
          con = new contact(lastname='temp');}
public DeleteContactWithNoCase(){        EndDate=DateTime.now();         }

// This Method will Delete the Contacts which do not have any cases before start Date 
public void  DeleteContact(){
    integer RecCount;
    integer i;
    RecCount=[Select count() from Contact where AccountId = '0017000000qz98bAAA' AND id not in (select ContactId from Case) limit 10000];
    List<Contact> DeleteList = New List<Contact>();
        for (i=1 ; i<=RecCount ; i=i+10000)
            {
                DeleteList = [SELECT Id FROM Contact WHERE CreatedDate <=:startDate  AND AccountId = '0017000000qz98bAAA' AND  id not in (select ContactId from Case) LIMIT 10000];
            }
        if(DeleteList.size()>0)
        {
                Delete DeleteList ; 
                message=DeleteList.size()+' Contacts have been successfully Deleted ';
        }
        else
        { 
              message ='0 Records Found Please select some other date';
        }

}
  • October 17, 2013
  • Like
  • 0

 I have a VF page and if I don't enter any values on that I will get following error

System.NullPointerException: Attempt to de-reference a null object

 

Error is in expression '{!Saveme}' in component <apex:commandButton> in page cancellistingpage


Class.CancelListingPageController.Saveme: line 18, column 1

 

controller as below

 

public class CancelListingPageController {
    
    public String name{get;set;}
    Public String ForgedDocs {get;set;}
    Public String Ids{get;set;}
    Public Listing__c Listing {get;set;}
    Public PageReference Saveme(){
    
    
   Contact  con = [SELECT Id, Name, Contact_Notes__c from Contact Where Id = :Listing.Contact__r.Id];
    Map<Id, Case> caseMap = new Map<Id, Case>([Select Id, Salesforce_Case_Link__c, Subject, 
                                                                  CreatedDate, Status, OwnerId, All_Attachments__c
                                                            from Case 
                                                            where ContactId = :con.Id 
                                                            order by CreatedDate desc]);
    
     
    if(Listing.Cancellation_Reason__c.contains('MISC Other reason') && (Listing.Cancellation_Note__c==null ||Listing.Custom_Note__c==null))
    {
           
           ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Internal Cancellation Note & Custom Adverse Action Note are required');
            ApexPages.addMessage(myMsg);
            return null;
    }
        Update Listing;
        Return new pagereference('/apex/Listing?id='+ids);
    }
    public CancelListingPageController(ApexPages.StandardController controller) {
        ids = controller.getId();
        Listing = [select Cancellation_Note__c,Forged_Docs__c,Status__c,
                            Cancellation_Reason__c,Custom_Note__c,Contact__r.id,Cancellation_Reason_Code__c from Listing__c where id =: ids];
        Listing.Status__c='Cancelled';  
    }
  • October 14, 2013
  • Like
  • 0

Hi SO I have a multiselect picklist on VF page
everything is goog all i need is to hide some values from picklist when a value from another picklist has selected
So there are two picklist
A (category)has categories
B (Cancellation reasons)has values for all those categories in one picklist
need to select multiple values from multiple categories
category  is only for display nothing else
now i need to show certain values depending upon the category selected
from picklist B
any help will be great

Identity Verification(category)
Did not provide identity documents
Incorrect customer phone number
Couldn't reach CX after multi attempts
Could not verify stated address

Income Verification(category)
Did not provide income documents
Could not verify income (Microbilt)
Could not verify stated income

  • October 06, 2013
  • Like
  • 0

I have a multiselect picklist cancellation reason which has some text values stored in it

example:

Incorrect Employer phone number

No longer employed by stated employer

Never employed by stated employer

Couldn't reach employer, multi attempts

Self Employed

 

code for these

EV1

EV2

EV3

EV4

but I need to send out codes for these values to .net listner using outbound messages

it is sending these values above in list

just need to send their code

 

my questions is how can i do with a formula or is there a way to do

like i store codes in picklist however show text on visual force page for those values

 

or how can send code if store text in picklist value

 

  • October 06, 2013
  • Like
  • 0

Hi I am just wondering if anyone is aware of background structure of outbound meaasage on workflows?

 

  • June 17, 2013
  • Like
  • 0

We have a integration (.net program) program we use to integrate emails  from exchange 2010 to salesforce.lately we are having some issues with it

We were using exchange 2002 and updated to exchange 2010 and now some emails don’t get attached in salesforce.

Following is different header(for example)example and I was wondering is there any rule for email headers we should follow

old

from: jschmoe@gmail.com

 bad

from: alias <alias@gmail.com>

 good

from: First Last <alias@gmail.com>

  • June 05, 2013
  • Like
  • 0

We have lots of File storage sitting while we are out of Data storage and I was wondering is there any way to convert or use file storage as data storage

  • June 04, 2013
  • Like
  • 0

I need to create three pick list and say 3rd is dependent on 2nd and 2nd is dependent 1st

however I can't make second multiselect type and make 3rd dependent on this

Any one know how to get this done any other options I can use

  • May 24, 2013
  • Like
  • 0

Hello There,

I am trying to get my production Data in Sandbox (at least 200-300 records from every object)

and I am not able to do so so far

Please help

Thanks

  • May 24, 2013
  • Like
  • 0

Need to delete all contact with no case attached to it and created before 12/31/12 How Can i do that non programmatically or programatically

  • May 20, 2013
  • Like
  • 0

All contacts from Account name =0017000000qz98bAAA with no case attched to them will be deleted

it is timing out

 

code for query is in following message

 

purge code not working in production but it is working in Full sandbox

 

 

 

 

 

SELECT Id FROM Contact WHERE CreatedDate <=:startDate  AND AccountId = '0017000000qz98bAAA' AND  id not in (select ContactId from Case) LIMIT 10000]

  • October 17, 2013
  • Like
  • 0

Hi SO I have a multiselect picklist on VF page
everything is goog all i need is to hide some values from picklist when a value from another picklist has selected
So there are two picklist
A (category)has categories
B (Cancellation reasons)has values for all those categories in one picklist
need to select multiple values from multiple categories
category  is only for display nothing else
now i need to show certain values depending upon the category selected
from picklist B
any help will be great

Identity Verification(category)
Did not provide identity documents
Incorrect customer phone number
Couldn't reach CX after multi attempts
Could not verify stated address

Income Verification(category)
Did not provide income documents
Could not verify income (Microbilt)
Could not verify stated income

  • October 06, 2013
  • Like
  • 0

I have a multiselect picklist cancellation reason which has some text values stored in it

example:

Incorrect Employer phone number

No longer employed by stated employer

Never employed by stated employer

Couldn't reach employer, multi attempts

Self Employed

 

code for these

EV1

EV2

EV3

EV4

but I need to send out codes for these values to .net listner using outbound messages

it is sending these values above in list

just need to send their code

 

my questions is how can i do with a formula or is there a way to do

like i store codes in picklist however show text on visual force page for those values

 

or how can send code if store text in picklist value

 

  • October 06, 2013
  • Like
  • 0

We have lots of File storage sitting while we are out of Data storage and I was wondering is there any way to convert or use file storage as data storage

  • June 04, 2013
  • Like
  • 0

I need to create three pick list and say 3rd is dependent on 2nd and 2nd is dependent 1st

however I can't make second multiselect type and make 3rd dependent on this

Any one know how to get this done any other options I can use

  • May 24, 2013
  • Like
  • 0

Hello There,

I am trying to get my production Data in Sandbox (at least 200-300 records from every object)

and I am not able to do so so far

Please help

Thanks

  • May 24, 2013
  • Like
  • 0

Need to delete all contact with no case attached to it and created before 12/31/12 How Can i do that non programmatically or programatically

  • May 20, 2013
  • Like
  • 0