• BrandonL
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 8
    Replies
Hello all,

First, I will describe the objects I'm working with.

Custom Object (EDS)
Custom Object (Plans)
Standard Object - Opportunity

We have the EDS and Plans objects master detailed to the Opportunity object and a lookup relationship between Plans and EDS. I am attemping to build a button on the EDS object for the lookup to Plans so when a user clicks the button, all the Plans related to the opportunity will pull into the EDS related list. Has anyone worked on a similar project or know if this is even possible?  Please advise if any more info is needed, thanks!

Hello,

 

I was successful refreshing reports out of the sandbox into the IDE, cut and paste the reports to a different folder locally, then refresh and save to server in the sandbox to mass move reports (report cleanup)

 

Now when I do the same for the production region, the files won't save to the server. I get "File only saved locally, not to server" warnings and some errors " Save error: filters-criteriaItems-condition: Operator does not work with the selected column" and "Save error: curency:Unsupported currency:GBP" in the error logs. The rest of the reports save locally, not to the server.

 

Can anyone help me understand how I was successfully able to perform this task in the sandbox environment but not production?

 

Thanks

Help please! I'm trying to setup a trigger for when an account owner changes that all contact owners change with the account owner EXCEPT for one individual (contact owner)..Can anyone help me add a line of code to say if the contact owner is 'Richard W' then don't change the contact owner, but if it's anyone else then change. My code so far is:

 

trigger reassignRelatedContactsAndOpportunities on Account (after update) {
   try {
      Set<Id> accountIds = new Set<Id>(); //set for holding the Ids of all Accounts that have been assigned to new Owners
      Map<Id, String> oldOwnerIds = new Map<Id, String>(); //map for holding the old account ownerId
      Map<Id, String> newOwnerIds = new Map<Id, String>(); //map for holding the new account ownerId
      Contact[] contactUpdates = new Contact[0]; //Contact sObject to hold OwnerId updates
      Opportunity[] opportunityUpdates = new Opportunity[0]; //Opportunity sObject to hold OwnerId updates
     
      for (Account a : Trigger.new) { //for all records
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId) {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId); //put the old OwnerId value in a map
            newOwnerIds.put(a.Id, a.OwnerId); //put the new OwnerId value in a map
            accountIds.add(a.Id); //add the Account Id to the set
         }
      }
     
      if (!accountIds.isEmpty()) { //if the accountIds Set is not empty
         for (Account act : [SELECT Id, (SELECT Id, OwnerId FROM Contacts), (SELECT Id, OwnerId FROM Opportunities WHERE IsClosed = False) FROM Account WHERE Id in :accountIds]) { //SOQL to get Contacts and Opportunities for updated Accounts
            String newOwnerId = newOwnerIds.get(act.Id); //get the new OwnerId value for the account
            String oldOwnerId = oldOwnerIds.get(act.Id); //get the old OwnerId value for the account
            for (Contact c : act.Contacts) { //for all contacts
            if (c.Contact Owner == 'Richard W')
            if (c.OwnerId == c.OwnerId) { //if the contact is assigned to the old account Owner      
                  Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId); //create a new Contact sObject
                  contactUpdates.add(updatedContact); //add the contact to our List of updates
               }
            }
            for (Opportunity o : act.Opportunities) { //for all opportunities
               if (o.OwnerId == oldOwnerId) { //if the opportunity is assigned to the old account Owner
                  Opportunity updatedOpportunity = new Opportunity(Id = o.Id, OwnerId = newOwnerId); //create a new Opportunity sObject
                  opportunityUpdates.add(updatedOpportunity); //add the opportunity to our List of updates
               }
            }
         }
         update contactUpdates; //update the Contacts
         update opportunityUpdates; //update the Opportunities
      }
   } catch(Exception e) { //catch errors
      System.Debug('reassignRelatedContactsAndOpportunities failure: '+e.getMessage()); //write error to the debug log
   }
}

Hello,

 

I was successful refreshing reports out of the sandbox into the IDE, cut and paste the reports to a different folder locally, then refresh and save to server in the sandbox to mass move reports (report cleanup)

 

Now when I do the same for the production region, the files won't save to the server. I get "File only saved locally, not to server" warnings and some errors " Save error: filters-criteriaItems-condition: Operator does not work with the selected column" and "Save error: curency:Unsupported currency:GBP" in the error logs. The rest of the reports save locally, not to the server.

 

Can anyone help me understand how I was successfully able to perform this task in the sandbox environment but not production?

 

Thanks

Hello all,

First, I will describe the objects I'm working with.

Custom Object (EDS)
Custom Object (Plans)
Standard Object - Opportunity

We have the EDS and Plans objects master detailed to the Opportunity object and a lookup relationship between Plans and EDS. I am attemping to build a button on the EDS object for the lookup to Plans so when a user clicks the button, all the Plans related to the opportunity will pull into the EDS related list. Has anyone worked on a similar project or know if this is even possible?  Please advise if any more info is needed, thanks!

Hello,

 

I was successful refreshing reports out of the sandbox into the IDE, cut and paste the reports to a different folder locally, then refresh and save to server in the sandbox to mass move reports (report cleanup)

 

Now when I do the same for the production region, the files won't save to the server. I get "File only saved locally, not to server" warnings and some errors " Save error: filters-criteriaItems-condition: Operator does not work with the selected column" and "Save error: curency:Unsupported currency:GBP" in the error logs. The rest of the reports save locally, not to the server.

 

Can anyone help me understand how I was successfully able to perform this task in the sandbox environment but not production?

 

Thanks

Help please! I'm trying to setup a trigger for when an account owner changes that all contact owners change with the account owner EXCEPT for one individual (contact owner)..Can anyone help me add a line of code to say if the contact owner is 'Richard W' then don't change the contact owner, but if it's anyone else then change. My code so far is:

 

trigger reassignRelatedContactsAndOpportunities on Account (after update) {
   try {
      Set<Id> accountIds = new Set<Id>(); //set for holding the Ids of all Accounts that have been assigned to new Owners
      Map<Id, String> oldOwnerIds = new Map<Id, String>(); //map for holding the old account ownerId
      Map<Id, String> newOwnerIds = new Map<Id, String>(); //map for holding the new account ownerId
      Contact[] contactUpdates = new Contact[0]; //Contact sObject to hold OwnerId updates
      Opportunity[] opportunityUpdates = new Opportunity[0]; //Opportunity sObject to hold OwnerId updates
     
      for (Account a : Trigger.new) { //for all records
         if (a.OwnerId != Trigger.oldMap.get(a.Id).OwnerId) {
            oldOwnerIds.put(a.Id, Trigger.oldMap.get(a.Id).OwnerId); //put the old OwnerId value in a map
            newOwnerIds.put(a.Id, a.OwnerId); //put the new OwnerId value in a map
            accountIds.add(a.Id); //add the Account Id to the set
         }
      }
     
      if (!accountIds.isEmpty()) { //if the accountIds Set is not empty
         for (Account act : [SELECT Id, (SELECT Id, OwnerId FROM Contacts), (SELECT Id, OwnerId FROM Opportunities WHERE IsClosed = False) FROM Account WHERE Id in :accountIds]) { //SOQL to get Contacts and Opportunities for updated Accounts
            String newOwnerId = newOwnerIds.get(act.Id); //get the new OwnerId value for the account
            String oldOwnerId = oldOwnerIds.get(act.Id); //get the old OwnerId value for the account
            for (Contact c : act.Contacts) { //for all contacts
            if (c.Contact Owner == 'Richard W')
            if (c.OwnerId == c.OwnerId) { //if the contact is assigned to the old account Owner      
                  Contact updatedContact = new Contact(Id = c.Id, OwnerId = newOwnerId); //create a new Contact sObject
                  contactUpdates.add(updatedContact); //add the contact to our List of updates
               }
            }
            for (Opportunity o : act.Opportunities) { //for all opportunities
               if (o.OwnerId == oldOwnerId) { //if the opportunity is assigned to the old account Owner
                  Opportunity updatedOpportunity = new Opportunity(Id = o.Id, OwnerId = newOwnerId); //create a new Opportunity sObject
                  opportunityUpdates.add(updatedOpportunity); //add the opportunity to our List of updates
               }
            }
         }
         update contactUpdates; //update the Contacts
         update opportunityUpdates; //update the Opportunities
      }
   } catch(Exception e) { //catch errors
      System.Debug('reassignRelatedContactsAndOpportunities failure: '+e.getMessage()); //write error to the debug log
   }
}