• CertifiedAdmin
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies

I've created the following Trigger to update the Status of an Event to "Rejected" before delete.  Meaning, our sales reps can delete events in SFDC, but we want the status to be changed to "Rejected" when they do this.  We have an active integration which would then send that status to another application, but delete it in SFDC.

 

I am new to APEX and need help creating a test class for this trigger so I can move it to production:

 

1
2
3
4
5
6
7
8
9
10
11
12
//Wrtite Same trigger for your object
trigger updateEventStatus on Event (before delete) 
{
    List<Event> listEvent = new List<Event>();
    for(Event e : [Select id from Event where id in: trigger.old])
    {
        //Change this to your status field API Name 
        e.Status__c = 'Rejected';
        listEvent.add(e);
    }
    update listEvent;
}



 

 

ANY insight would be MUCH appreciated!

 

Best regards,

 

Adam

Can someone help me define a trigger (or workflow if available...just can't get it to work) that will updated a field "Status" on our Event record when the event is deleted.

 

We currently use the standard delete button, but I believe there is an "isDeleted" system checkbox I was hoping to work from.  When this box is set to true, I would like the status changed to "Rejected" before it hits the recyble bin.  Is this possible?  We are integrating our activities to SAP CRM, and need to pass the updated status to CRM before it is deleted in SFDC.

 

Any help would be much appreciated!!

I've created the following Trigger to update the Status of an Event to "Rejected" before delete.  Meaning, our sales reps can delete events in SFDC, but we want the status to be changed to "Rejected" when they do this.  We have an active integration which would then send that status to another application, but delete it in SFDC.

 

I am new to APEX and need help creating a test class for this trigger so I can move it to production:

 

1
2
3
4
5
6
7
8
9
10
11
12
//Wrtite Same trigger for your object
trigger updateEventStatus on Event (before delete) 
{
    List<Event> listEvent = new List<Event>();
    for(Event e : [Select id from Event where id in: trigger.old])
    {
        //Change this to your status field API Name 
        e.Status__c = 'Rejected';
        listEvent.add(e);
    }
    update listEvent;
}



 

 

ANY insight would be MUCH appreciated!

 

Best regards,

 

Adam

Can someone help me define a trigger (or workflow if available...just can't get it to work) that will updated a field "Status" on our Event record when the event is deleted.

 

We currently use the standard delete button, but I believe there is an "isDeleted" system checkbox I was hoping to work from.  When this box is set to true, I would like the status changed to "Rejected" before it hits the recyble bin.  Is this possible?  We are integrating our activities to SAP CRM, and need to pass the updated status to CRM before it is deleted in SFDC.

 

Any help would be much appreciated!!

Hi,

I am connecting to a webservice using visualforce controller. I have parsed the WSDL into proxy apex classes and have the service methods exposed. Now when I call the method and try to hit the service I get the error message saying.
System.CalloutException: IO Exception: External server did not return any content

When I call the same service using SOAP UI with same input parameters there is no issue and I get positive response from the service.

I validated from the service provider and came to know that when I make call from SFDC service is not getting hit. 

 

Any help is appreciated.