• OivlaSforce
  • NEWBIE
  • 25 Points
  • Member since 2012

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

Hi all,

 

I enabled customer portal and autoregistration (with authenticated website license) for my site.

The standard profile "Authenticated Website" doesn't permit to access to the custom object of my app.

 

How can I enable access to custom object for authenticated users on the site?

 

 

Hi,

 

I have a simple update trigger that modify the references of object thread when a Case is updated. The test is successful in sandbox environment but I have a problem on the assertion when I try to deploy It on the server and the deploy fails. . 

Someone can help me?

 

Thanks

 

Following the code:

 

trigger AccountUpdate on Case (before update) {
     
    for (Case c: Trigger.new){
        Case oldCase = Trigger.oldMap.get(c.ID);
        
        if (c.AccountId != oldCase.AccountId || c.ContactId != oldCase.ContactId) {
            List<Thread__c> threadList = [SELECT Account__c FROM Thread__c WHERE Case__c= :c.id];
            
            if(!threadList.isEmpty()){
                for(Thread__c t: threadList){
                    System.debug('#### Aggiorno i Thread...con '+c.AccountId);
                    t.Account__c = c.AccountId;
                    t.Contact__c = c.ContactId;
                }
                update threadList;
            }
        }
    }
    
    
}

 

@isTest
private class TriggerTests {
  
    
   static testMethod void AccountUpdateTriggerTest(){
       
        Account acct = new Account(name='test account');
        Contact ct = new Contact(AccountId=acct.Id,lastname='testing',firstname='E2C');
        insert acct;
        insert ct;
       
        Case c = new Case();
        c.AccountId = acct.id;
        c.ContactId = ct.id;
        insert c;
        
       List<Thread__c> threadList = new List<Thread__c>();
       for(Integer i=0; i<5; i++){
            Thread__c t = new Thread__c();
            t.Case__c = c.id;
            t.Account__c = c.AccountId;
            t.Contact__c = c.ContactId;
            threadList.add(t);
        }
        insert threadList;
       
        Account acct1 = new Account(name='test account nuovo');
        Contact ct1 = new Contact(AccountId=acct1.Id,lastname='testing_nuovo',firstname='E2C_nuovo');
        insert acct1;
        insert ct1;
        
        c.AccountId = acct1.id;
        c.ContactId = ct1.id;
        update c;
        
        threadList = [SELECT Account__c,Contact__c FROM Thread__c WHERE Case__c= :c.id];
        for(Thread__c th : threadList){
            System.assertEquals(c.AccountId,th.Account__c);
            System.assertEquals(c.ContactId,th.Contact__c);
        }
    } 

}
    

 

Hi all,

 

I developed an Email Service and I'm having a problem.

When the salesforce platform receives an email with an Attachment too big, an SMTP delivery error message is sent back to the sender of the email.

I know that this is an SMTP level problem but is there a way to inhibit this behaviour?

I don't need to get the attachment, I only need to elaborate the email with my email service and not sending back to the sender any error message.

 

Thanks,

 

Salvatore 

Hi,

 

I have a simple update trigger that modify the references of object thread when a Case is updated. The test is successful in sandbox environment but I have a problem on the assertion when I try to deploy It on the server and the deploy fails. . 

Someone can help me?

 

Thanks

 

Following the code:

 

trigger AccountUpdate on Case (before update) {
     
    for (Case c: Trigger.new){
        Case oldCase = Trigger.oldMap.get(c.ID);
        
        if (c.AccountId != oldCase.AccountId || c.ContactId != oldCase.ContactId) {
            List<Thread__c> threadList = [SELECT Account__c FROM Thread__c WHERE Case__c= :c.id];
            
            if(!threadList.isEmpty()){
                for(Thread__c t: threadList){
                    System.debug('#### Aggiorno i Thread...con '+c.AccountId);
                    t.Account__c = c.AccountId;
                    t.Contact__c = c.ContactId;
                }
                update threadList;
            }
        }
    }
    
    
}

 

@isTest
private class TriggerTests {
  
    
   static testMethod void AccountUpdateTriggerTest(){
       
        Account acct = new Account(name='test account');
        Contact ct = new Contact(AccountId=acct.Id,lastname='testing',firstname='E2C');
        insert acct;
        insert ct;
       
        Case c = new Case();
        c.AccountId = acct.id;
        c.ContactId = ct.id;
        insert c;
        
       List<Thread__c> threadList = new List<Thread__c>();
       for(Integer i=0; i<5; i++){
            Thread__c t = new Thread__c();
            t.Case__c = c.id;
            t.Account__c = c.AccountId;
            t.Contact__c = c.ContactId;
            threadList.add(t);
        }
        insert threadList;
       
        Account acct1 = new Account(name='test account nuovo');
        Contact ct1 = new Contact(AccountId=acct1.Id,lastname='testing_nuovo',firstname='E2C_nuovo');
        insert acct1;
        insert ct1;
        
        c.AccountId = acct1.id;
        c.ContactId = ct1.id;
        update c;
        
        threadList = [SELECT Account__c,Contact__c FROM Thread__c WHERE Case__c= :c.id];
        for(Thread__c th : threadList){
            System.assertEquals(c.AccountId,th.Account__c);
            System.assertEquals(c.ContactId,th.Contact__c);
        }
    } 

}
    

 

Hi,

 

my email box redirects the received emails to a Salesforce email service. The original toAddress is modified with the address of the target Salesforce email service in the redirection process

 

Is there a way to obtain the original toAddress of the email received by the Salesforce email service?

 

Thanks,

 

Salvatore