• SocialRent
  • NEWBIE
  • 0 Points
  • Member since 2012

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

I have a before update trigger that triggers successfully before an update of my custom object. The trigger looks to see whether a particular field is a particular value in this update. If so, then it will send out emails to particular people and update relevant fields in the object. 

I wrote test code which edits the particular field, then performs the update operation. I went into the debug logs to see what happened after this. The triggers goes off before the update (as it should), but when accessing the data retrieved from a SOQL query of Trigger.new, the data is not what the test code set to update, but what was originally there before the update, which is our problem. After the trigger has finished running, the field is now what it should have been after the update. 

I tried changing the trigger to be on after update, and trigger.new succesfully returns the correct value that my test code updated. However, because it is after update, I cannot modify the object.

Any ideas?

So I'm trying to deploy our Apex code and workflows over to our production app from our sandbox. I go to Setup->Setup->Deployment Connections in order to authorize the connections. However, in both the dev and production environments, I cannot find any sort of "edit" option next to the name of the connection. When I click on the connection, it gives me two checkboxes for authotizing inbound and outbound changes, but they are greyed out and I cannot check either. I have added the following permissions and all other necessary ones for them:

 

Deploy Change Sets

Create and Upload Change Sets

Create AppExchange Packages

Upload AppExchange Packages

Download AppExchange Packages

 

I am an admin for the app, so I can't figure out any other reason why I cannot edit the deployment connections.