• James Benson
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies
Hi,

I'm trying to update the following trigger using a changeset. However, I cannot run apex tests for a specific test class because the trigger doesn't reference one.
 
trigger LeadDomainMatch2 on Lead (before Insert,before update) {
    for (Lead leadInLoop : Trigger.new) {
   
if (leadInLoop.Domain__c != 'gmail.com' && leadInLoop.Domain__c != 'yahoo.com' && LeadInLoop.New_York__c == FALSE && LeadInLoop.New_Jersey__c == FALSE && LeadInLoop.Status == 'MQL' && LeadInLoop.Florida__c == FALSE) {
    // Retrieve owner from Account record based on email domain name
    list <Account> acct = [Select Pro_Associate_ID__c from Account WHERE Account_Email_Domain__c = :leadInLoop.Domain__c AND Account.Type = 'Customer' Limit 2];
    
        if (acct.size() == 1) {

    //the next line is for debugging, to check that you are getting a result back from the query
            System.debug('account owner id is: ' + acct[0].Pro_Associate_ID__c);
    leadInLoop.OwnerId=acct[0].Pro_Associate_ID__c;
        }
    }
}
}
How do I fix this trigger so I can deploy it to production?

James
Hi,

I'm trying to deploy a trigger change using Force.com IDE and am receiving the following error:

Description    Resource    Path    Location    Type
line -1, column -1: Dependent class is invalid and needs recompilation:
 Class OpportunityLineItemTriggerHandlerTest : Method does not exist or incorrect signature: void sendEmail(Id) from the type CustomSalesInvoicePrintController    classfind        line 1    Force.com run test failure


I've done testing in our full sandbox and was able to update the following trigger without issue. I am unable to do the same when deploying for production. 

What's odd is that this trigger doesn't reference any other triggers and so I'm confused why the error code says it does. Here's the trigger code:
 
trigger LeadDomainMatch on Lead (before Insert,before update) {
    for (Lead leadInLoop : Trigger.new) {
   
if (leadInLoop.Domain__c != 'gmail.com' && leadInLoop.Domain__c != 'yahoo.com' && LeadInLoop.New_York__c == FALSE && LeadInLoop.New_Jersey__c == FALSE && LeadInLoop.Status == 'MQL' && LeadInLoop.Florida__c == FALSE) {
    // Retrieve owner from Account record based on email domain name
    list <Account> acct = [Select AMAOwnerID__c from Account WHERE Account_Email_Domain__c = :leadInLoop.Domain__c AND Account.Type = 'Customer' Limit 2];
    
        if (acct.size() == 1) {

    //the next line is for debugging, to check that you are getting a result back from the query
            System.debug('account owner id is: ' + acct[0].AMAOwnerID__c);
    leadInLoop.OwnerId=acct[0].AMAOwnerID__c;
        }
    }
}
}

All I'm trying to change is 'AMAOwnerID__c' to 'Pro_Associate_ID__c' (a field that already exists in production).

Any help would be appreciated!
James

 
Hi, I received this error code when Marketo attempted to sync to our Salesforce production environment:

Salesforce Sync Error

Why: The following error was encountered:

Error details: updateSObjects failed for 37 Contact record(s) - An unexpected error occurred. Please include this ErrorId if you contact support: 837806601-13944 (-1424170687)

What to do now?
Contact your Salesforce administrator for further troubleshooting.

I've contact Salesforce support without luck - was wondering if any of you have seen this error code before or know how to resolve it.

Best,
James

Hi,

My users have been using Almond LMS to compelte trainings related to their roles in my organization. When assigning a 'Training Plan' to a user the only field that the visualforce page gives me to update is 'User' (see below)

User-added image

I want to be able to enter a custom field called 'Due Date' (see below) located on the Training Plan Assignment record (which is created when saving the 'Training Plan' pictured above'):

User-added image

When I attempt to add the field 'Training_Plan_Assignment__c.Due_Date__c' into the visualforce code relating to the assignment page of the Training Plans I get the following error (code I use surronded by red rectangle): 

User-added image

Why am I getting a controller error? Anyway to fix?

Thank you!

The only link I find is developer.salesforce.com/signup

But, I already made an account, I just need the url to actually log in.



 
Hi, I received this error code when Marketo attempted to sync to our Salesforce production environment:

Salesforce Sync Error

Why: The following error was encountered:

Error details: updateSObjects failed for 37 Contact record(s) - An unexpected error occurred. Please include this ErrorId if you contact support: 837806601-13944 (-1424170687)

What to do now?
Contact your Salesforce administrator for further troubleshooting.

I've contact Salesforce support without luck - was wondering if any of you have seen this error code before or know how to resolve it.

Best,
James
Hi,

I'm trying to update the following trigger using a changeset. However, I cannot run apex tests for a specific test class because the trigger doesn't reference one.
 
trigger LeadDomainMatch2 on Lead (before Insert,before update) {
    for (Lead leadInLoop : Trigger.new) {
   
if (leadInLoop.Domain__c != 'gmail.com' && leadInLoop.Domain__c != 'yahoo.com' && LeadInLoop.New_York__c == FALSE && LeadInLoop.New_Jersey__c == FALSE && LeadInLoop.Status == 'MQL' && LeadInLoop.Florida__c == FALSE) {
    // Retrieve owner from Account record based on email domain name
    list <Account> acct = [Select Pro_Associate_ID__c from Account WHERE Account_Email_Domain__c = :leadInLoop.Domain__c AND Account.Type = 'Customer' Limit 2];
    
        if (acct.size() == 1) {

    //the next line is for debugging, to check that you are getting a result back from the query
            System.debug('account owner id is: ' + acct[0].Pro_Associate_ID__c);
    leadInLoop.OwnerId=acct[0].Pro_Associate_ID__c;
        }
    }
}
}
How do I fix this trigger so I can deploy it to production?

James
Hi,

I'm trying to deploy a trigger change using Force.com IDE and am receiving the following error:

Description    Resource    Path    Location    Type
line -1, column -1: Dependent class is invalid and needs recompilation:
 Class OpportunityLineItemTriggerHandlerTest : Method does not exist or incorrect signature: void sendEmail(Id) from the type CustomSalesInvoicePrintController    classfind        line 1    Force.com run test failure


I've done testing in our full sandbox and was able to update the following trigger without issue. I am unable to do the same when deploying for production. 

What's odd is that this trigger doesn't reference any other triggers and so I'm confused why the error code says it does. Here's the trigger code:
 
trigger LeadDomainMatch on Lead (before Insert,before update) {
    for (Lead leadInLoop : Trigger.new) {
   
if (leadInLoop.Domain__c != 'gmail.com' && leadInLoop.Domain__c != 'yahoo.com' && LeadInLoop.New_York__c == FALSE && LeadInLoop.New_Jersey__c == FALSE && LeadInLoop.Status == 'MQL' && LeadInLoop.Florida__c == FALSE) {
    // Retrieve owner from Account record based on email domain name
    list <Account> acct = [Select AMAOwnerID__c from Account WHERE Account_Email_Domain__c = :leadInLoop.Domain__c AND Account.Type = 'Customer' Limit 2];
    
        if (acct.size() == 1) {

    //the next line is for debugging, to check that you are getting a result back from the query
            System.debug('account owner id is: ' + acct[0].AMAOwnerID__c);
    leadInLoop.OwnerId=acct[0].AMAOwnerID__c;
        }
    }
}
}

All I'm trying to change is 'AMAOwnerID__c' to 'Pro_Associate_ID__c' (a field that already exists in production).

Any help would be appreciated!
James

 

Hi,

My users have been using Almond LMS to compelte trainings related to their roles in my organization. When assigning a 'Training Plan' to a user the only field that the visualforce page gives me to update is 'User' (see below)

User-added image

I want to be able to enter a custom field called 'Due Date' (see below) located on the Training Plan Assignment record (which is created when saving the 'Training Plan' pictured above'):

User-added image

When I attempt to add the field 'Training_Plan_Assignment__c.Due_Date__c' into the visualforce code relating to the assignment page of the Training Plans I get the following error (code I use surronded by red rectangle): 

User-added image

Why am I getting a controller error? Anyway to fix?

Thank you!

Hello,

So, I'm doing the third unit "Automate Sets of Delayed Actions with Workflow" from the module "Process Automation" (Admin Intermediate) and the challeng is to set a workflow rule, I set the rule and the actions with the name that was asked, unfortunately it didn't work out and whenever I tried to check if the challenge was done, basically what it said was "rule cannot execute". I tried to go around it, changed some stuff and still nothing and then I had the great idea of just deleting the rule and do it from scratch and now both actions - 'Set Case to Escalated' & 'Follow Up on Escalated Case' - when I try to create them displays the error message on the title. I tried to add a "1" in the end but when I check the challenge it doesn't find it. 

Is there any solution around this? How can I make it work? Or I just won't be able to finish this unit now? 
Sorry for the english and I express myself too confusingly, and also for my lack of knowledge.

Thank you

The only link I find is developer.salesforce.com/signup

But, I already made an account, I just need the url to actually log in.



 
Connected App Option " Limit access to apps that are currently installed and have "Admin approved users are pre-authorized" as their Permitted Users setting." is preventing OAuth from working with our App. It works when the flag is unchecked, doesn't when it is checked. Every profile in the org has access to the app and "Admin approved users are pre-authorized" is selected on the Connected App page.  This appears to be a Salesforce bug.  Has anyone else had this experience?