• Sriram M
  • NEWBIE
  • 20 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
Hi all,

I experienced this problem recently when I tried deploying a list of Custom labels along with their translations from sandbox to production.

I have created a change set in sandbox including all the Custom lables and uploaded it to the Production environment.
Then I have validated and deployed it in Production environment from Inbound change sets. All the other changes are getting reflected in production but the translations.

For each of the custom labels I have added mulitple translations which are not deployed in the production. The weird part is I already deployed some of the custom labels from sandbox to production for the first time. It went well.

Now the deployment is not updating the translations in the custom labels. Anyone here experienced the same? BTW i'm not using Force.com IDE.
Please suggest a solution for this.

Thanks in advance
Hi all,

I have a requirement for adding a Captcha mechanism to a form. 
I don't want to use the Google reCaptcha. So I did some searching and found the below link.

http://www.tehnrd.com/simple-visualforce-captcha/

I was able to add the captcha as given in the above link and make it functional. 

Now the problem starts when I try to add the logic for refreshing the captcha (for loading a different captcha pattern). 
I tried adding a commandlink. It is refreshing the entire page along with the captcha. I wanted to have an AJAX like functionality which refreshes the particular captcha section alone.

The APEX code which generates the captcha resides in my controller class file which is responsible for controlling the entire form.

How can I make the refresh without affecting the rest of the form functionality? I have to invoke the specific method which generates the captcha, get the updated captcha value and render it in the captcha section.

Please help me out with your suggestions and solutions.

Thanks in advance.

Hi all,

I am facing the following issue when making a deploy from a sandbox environment.

Deployment issue

From the problem, I could see the privilege is not sufficient to validate or deploy the test classes. 
But I have system administrator privilege to the environment. Not sure how to proceed with this.

Thanks in advance.
Sriram
Hi all,

I created a public knowledge website (without login) in which I have added a case creation form. Whenever I create a case through the website, it will create a contact of the user who have created that case.

If the same user tries to create a case, my code checks if the contact is already available in salesforce and appends the case to that contact. But this functionality is working only for the contacts which are created through the Website (using Guest user account).

The problem is that this functionality is not working for manually created contacts (through logged-in salesforce user account). My code doesn't even finds the contact which was manually created.

Below is my controller code.
public with sharing class CreateCaseController {
    
    public string caseIDVal = '';
    public Contact conRec{get; set;}
    public Case caseRec{get; set;}
    public String contactEmail{get; set;}
    
    List<Contact> getContactDetails;
    
    public CreateCaseController(){

        conRec = new Contact(); 
        caseRec = new Case(); 
    }
    public pagereference saveData(){
        System.Debug('======================>>>> hit inisde saveData function');
        if(conRec.lastName== null || caseRec.SuppliedCompany == null  || contactEmail == null  || caseRec.Subject == null  || caseRec.Description == null  || caseRec.Impact__c == '--What is the impact?--')
        {
            PageReference pageRef = new PageReference('/createcase');
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Please fill-in all the details to create a case!');
            ApexPages.addMessage(myMsg);
            //pageRef.setRedirect(true);
            return pageRef;
        }
        else
        {
        createContactRecord();
        System.Debug('======================>>>> hit after createcontactrecord function');
        caseRec.ContactId = conRec.Id;
        if(caseRec.Impact__c == 'Just me')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'Low';
            //caseRec.Case_Priority__c = '3';
        }
        else if(caseRec.Impact__c == 'Some users but not all')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'Medium';
            //caseRec.Case_Priority__c = '2';
        }
        else if(caseRec.Impact__c == 'Everyone in the company')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'High';
            //caseRec.Case_Priority__c = '1';
        }
        
        insert caseRec; 
        PageReference pageRef = new PageReference('/caseconfirmation?caseid='+caseRec.Id);
        pageRef.setRedirect(true);
        return pageRef;
        }
        
    }
    public void createContactRecord() 
    
    {
        System.Debug('======================>>>> hit inside createcontactrecord function');
        try
        {
           getContactDetails = [SELECT ID FROM Contact WHERE Email = :contactEmail LIMIT 1];
           System.Debug('======================>>>> hit inside createcontactrecord function try');
           if(getContactDetails.size() == 0)
           {
               conRec.Email = contactEmail;
               System.Debug('mailID doesnot exist=====>'+contactEmail);
               insert conRec;
               System.Debug('contact newly created.=====>>>>conrecid===='+conRec.Id);
           }
           else
           {
               for(Contact cntct : getContactDetails )
               {
                   System.Debug('mailID exist=====>'+contactEmail);
                   System.Debug('contactid========='+cntct.Id);
                   conRec.Id = cntct.Id;
               }
           }
            
            
            
            System.Debug('contactid='+conRec.id);
        }
        catch(System.Exception ex)
        {
            System.Debug(ex.getMessage());
        }
    }
}
the function saveData is the form submission action.

Privileges

From above privileges on profile screenshot, I could see that I don't have the 'edit' permission for contacts. But I wonder how the website is able to edit and append contacts which are created through the website but not the manual contacts.

Please help me out guys.

Thanks in advance

Hi all,

I have a requirement for adding a Captcha mechanism to a form. 
I don't want to use the Google reCaptcha. So I did some searching and found the below link.

http://www.tehnrd.com/simple-visualforce-captcha/

I was able to add the captcha as given in the above link and make it functional. 

Now the problem starts when I try to add the logic for refreshing the captcha (for loading a different captcha pattern). 
I tried adding a commandlink. It is refreshing the entire page along with the captcha. I wanted to have an AJAX like functionality which refreshes the particular captcha section alone.

The APEX code which generates the captcha resides in my controller class file which is responsible for controlling the entire form.

How can I make the refresh without affecting the rest of the form functionality? I have to invoke the specific method which generates the captcha, get the updated captcha value and render it in the captcha section.

Please help me out with your suggestions and solutions.

Thanks in advance.

Hi all,

I am facing the following issue when making a deploy from a sandbox environment.

Deployment issue

From the problem, I could see the privilege is not sufficient to validate or deploy the test classes. 
But I have system administrator privilege to the environment. Not sure how to proceed with this.

Thanks in advance.
Sriram
Hi all,

I created a public knowledge website (without login) in which I have added a case creation form. Whenever I create a case through the website, it will create a contact of the user who have created that case.

If the same user tries to create a case, my code checks if the contact is already available in salesforce and appends the case to that contact. But this functionality is working only for the contacts which are created through the Website (using Guest user account).

The problem is that this functionality is not working for manually created contacts (through logged-in salesforce user account). My code doesn't even finds the contact which was manually created.

Below is my controller code.
public with sharing class CreateCaseController {
    
    public string caseIDVal = '';
    public Contact conRec{get; set;}
    public Case caseRec{get; set;}
    public String contactEmail{get; set;}
    
    List<Contact> getContactDetails;
    
    public CreateCaseController(){

        conRec = new Contact(); 
        caseRec = new Case(); 
    }
    public pagereference saveData(){
        System.Debug('======================>>>> hit inisde saveData function');
        if(conRec.lastName== null || caseRec.SuppliedCompany == null  || contactEmail == null  || caseRec.Subject == null  || caseRec.Description == null  || caseRec.Impact__c == '--What is the impact?--')
        {
            PageReference pageRef = new PageReference('/createcase');
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Please fill-in all the details to create a case!');
            ApexPages.addMessage(myMsg);
            //pageRef.setRedirect(true);
            return pageRef;
        }
        else
        {
        createContactRecord();
        System.Debug('======================>>>> hit after createcontactrecord function');
        caseRec.ContactId = conRec.Id;
        if(caseRec.Impact__c == 'Just me')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'Low';
            //caseRec.Case_Priority__c = '3';
        }
        else if(caseRec.Impact__c == 'Some users but not all')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'Medium';
            //caseRec.Case_Priority__c = '2';
        }
        else if(caseRec.Impact__c == 'Everyone in the company')
        {
            caseRec.Impact__c = 'Low';
            caseRec.Urgency__c = 'High';
            //caseRec.Case_Priority__c = '1';
        }
        
        insert caseRec; 
        PageReference pageRef = new PageReference('/caseconfirmation?caseid='+caseRec.Id);
        pageRef.setRedirect(true);
        return pageRef;
        }
        
    }
    public void createContactRecord() 
    
    {
        System.Debug('======================>>>> hit inside createcontactrecord function');
        try
        {
           getContactDetails = [SELECT ID FROM Contact WHERE Email = :contactEmail LIMIT 1];
           System.Debug('======================>>>> hit inside createcontactrecord function try');
           if(getContactDetails.size() == 0)
           {
               conRec.Email = contactEmail;
               System.Debug('mailID doesnot exist=====>'+contactEmail);
               insert conRec;
               System.Debug('contact newly created.=====>>>>conrecid===='+conRec.Id);
           }
           else
           {
               for(Contact cntct : getContactDetails )
               {
                   System.Debug('mailID exist=====>'+contactEmail);
                   System.Debug('contactid========='+cntct.Id);
                   conRec.Id = cntct.Id;
               }
           }
            
            
            
            System.Debug('contactid='+conRec.id);
        }
        catch(System.Exception ex)
        {
            System.Debug(ex.getMessage());
        }
    }
}
the function saveData is the form submission action.

Privileges

From above privileges on profile screenshot, I could see that I don't have the 'edit' permission for contacts. But I wonder how the website is able to edit and append contacts which are created through the website but not the manual contacts.

Please help me out guys.

Thanks in advance