• das61
  • NEWBIE
  • 45 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 5
    Replies
PROBLEM:  I'm setting up S2S for opportunities.  I have several thousand opportunities that already exist in both orgs. I can manually link to an existing opportunity in the target org when I manually accept the opportunity. I would like to programatically link those opportunities.  

QUESTION:  If I provide the target opportunity ID in a mapped field on the source record, can I use a trigger to automatically link from the source to the target opportunity?  This is really a one time event.  If this is not possible, are there any other solutions?

All replies are appreciated.
  • October 27, 2016
  • Like
  • 0
I would like to prevent certain profiles from deleting Campaigns from the Campaign Influence related list on the  opportunity.  This doesn't seem to be as straight forward as I originally anticipated.  Any help would be very appreciated.
  • July 21, 2016
  • Like
  • 0
I have 15 sandboxes.  I'm getting the email below each time the report tries to run.  How can I determine which sand box this is coming from?  I'm afraid I'm going to look at each one.

Thanks.

============================
Sandbox: Scheduled report Pipeline did not complete


The scheduled report Pipeline ran at 8/25/2014 7:01 AM as the running user Bob xxxx. The following error occurred:

The user account that runs the report (the running user) is inactive.

To fix this problem you can either:
1) Reactivate the user - Bob xxxx
2) Update the schedule and change the running user - https://cs16.salesforce.com/00Oa0000008Lfsz?nav=schedule&fromSchedIcon=true
3) Delete the scheduled job. If the running user scheduled a report in his or her personal folder, you cannot edit the schedule; however, if you have "Modify All Data" permission, you can delete the job from the All Scheduled Jobs page: https://cs16.salesforce.com/08e
       

Click this link to access the report:
https://cs16.salesforce.com/00Oa0000008Lfsz.
If you are not currently logged in, salesforce.com prompts you to do so.

Thank you,

salesforce.com
==================================
  • August 25, 2014
  • Like
  • 0
Hello.

I'm new to the forums.  I have a question regarding setting a flag (checkbox) to cause certain trigger and workflow actions.  I have a button with the javascript shown below.  There is a flag called Submit to Legal.  When this is set to true, it triggers an email alert to be sent as an action in a workflow.  I orginally thought I could then clear the flag (set to false) in an apex trigger that already exists.  It appears the flag is being cleared before the workflow is executed and therefore the email is not being sent.  When I comment out the code to clear the flag, the email is sent but the flag is not cleared.  What would be the best practice to accomplish this.

Thanks in advance.

 var agreement= new sforce.SObject("Agreement__c"); 
agreement.Id= "{!Agreement__c.Id}"; 
var Agreement_Status = "{!Agreement__c.Agreement_Status__c}"; 
//var CMO_Request_Status = "{!Agreement__c.CMO_Request_Status__c}"; 

if (Agreement_Status != 'Legal Submitted' && Agreement_Status != 'Legal Assigned' && Agreement_Status != 'Legal Drafting' && Agreement_Status != 'Legal in Review' && Agreement_Status != 'Closed'){ 
agreement.Submit_To_Legal__c = true; 
var result = sforce.connection.update([agreement]); 

if (result[0].getBoolean("success")) 
{ 
// Refresh window 
window.location = window.location.href+'?eraseCache=true'; 
window.location.reload(true); 
} 
else 
{ 
alert("Error saving Agreement"+result[0]); 
} 
}else{ 
alert('Agreement is already in Legal or Closed status.'); 
}
  • August 20, 2014
  • Like
  • 0

Hello all.

 

I'm new to apex so apologies for the ignorant questions.  I'm getting a System.NullPointerException on the following trigger.  After insert and after update work fine.  I don't think it's failing on the method as it still occurs when I comment it out.  It seems to fail on List<Asset> assets = trigger.newMap.values();  Any help would be greatly appreciated.

 

trigger Customer_Since on Asset (after insert, after update, before delete) {
        List<Asset> assets = trigger.newMap.values();
        List<String> accountIds = new List<String>();

        for (Asset a : assets){
        accountIds.add(a.accountId);
        }
    System.Debug (accountIds);
    UpdateCustomerSince.updateCustomerSince(accountIds);       
 
}

 

Thanks in advance.

 

dave

 

  • May 15, 2013
  • Like
  • 0
I have 15 sandboxes.  I'm getting the email below each time the report tries to run.  How can I determine which sand box this is coming from?  I'm afraid I'm going to look at each one.

Thanks.

============================
Sandbox: Scheduled report Pipeline did not complete


The scheduled report Pipeline ran at 8/25/2014 7:01 AM as the running user Bob xxxx. The following error occurred:

The user account that runs the report (the running user) is inactive.

To fix this problem you can either:
1) Reactivate the user - Bob xxxx
2) Update the schedule and change the running user - https://cs16.salesforce.com/00Oa0000008Lfsz?nav=schedule&fromSchedIcon=true
3) Delete the scheduled job. If the running user scheduled a report in his or her personal folder, you cannot edit the schedule; however, if you have "Modify All Data" permission, you can delete the job from the All Scheduled Jobs page: https://cs16.salesforce.com/08e
       

Click this link to access the report:
https://cs16.salesforce.com/00Oa0000008Lfsz.
If you are not currently logged in, salesforce.com prompts you to do so.

Thank you,

salesforce.com
==================================
  • August 25, 2014
  • Like
  • 0
Hello.

I'm new to the forums.  I have a question regarding setting a flag (checkbox) to cause certain trigger and workflow actions.  I have a button with the javascript shown below.  There is a flag called Submit to Legal.  When this is set to true, it triggers an email alert to be sent as an action in a workflow.  I orginally thought I could then clear the flag (set to false) in an apex trigger that already exists.  It appears the flag is being cleared before the workflow is executed and therefore the email is not being sent.  When I comment out the code to clear the flag, the email is sent but the flag is not cleared.  What would be the best practice to accomplish this.

Thanks in advance.

 var agreement= new sforce.SObject("Agreement__c"); 
agreement.Id= "{!Agreement__c.Id}"; 
var Agreement_Status = "{!Agreement__c.Agreement_Status__c}"; 
//var CMO_Request_Status = "{!Agreement__c.CMO_Request_Status__c}"; 

if (Agreement_Status != 'Legal Submitted' && Agreement_Status != 'Legal Assigned' && Agreement_Status != 'Legal Drafting' && Agreement_Status != 'Legal in Review' && Agreement_Status != 'Closed'){ 
agreement.Submit_To_Legal__c = true; 
var result = sforce.connection.update([agreement]); 

if (result[0].getBoolean("success")) 
{ 
// Refresh window 
window.location = window.location.href+'?eraseCache=true'; 
window.location.reload(true); 
} 
else 
{ 
alert("Error saving Agreement"+result[0]); 
} 
}else{ 
alert('Agreement is already in Legal or Closed status.'); 
}
  • August 20, 2014
  • Like
  • 0

Hello all.

 

I'm new to apex so apologies for the ignorant questions.  I'm getting a System.NullPointerException on the following trigger.  After insert and after update work fine.  I don't think it's failing on the method as it still occurs when I comment it out.  It seems to fail on List<Asset> assets = trigger.newMap.values();  Any help would be greatly appreciated.

 

trigger Customer_Since on Asset (after insert, after update, before delete) {
        List<Asset> assets = trigger.newMap.values();
        List<String> accountIds = new List<String>();

        for (Asset a : assets){
        accountIds.add(a.accountId);
        }
    System.Debug (accountIds);
    UpdateCustomerSince.updateCustomerSince(accountIds);       
 
}

 

Thanks in advance.

 

dave

 

  • May 15, 2013
  • Like
  • 0