• trick1
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 12
    Replies

Hi,

 

I am the admin of the system .Whenever I want to make changes to anything related to particular user in the system I goto setup,Manage users and Users and then click on the login link beside the user name and then I can make changes for that user as I am logged in as that user.Now, I have one user for whom I do not see that login link so how do I make changes to that user.How do I login as that user.Any help will be appreciated.

 

 

 

 

Hi Friends.

 while deploying something to the production from eclipse.I got below given error and I am not sure what is the problem  and what  gonna be the solution.

This code has been written by somebody who was working for this this company prior to me so I am looking for help from you guys.

 

It could well be becasue of the test class which is written at the end of the code.That is where I see https://URL

 

Error.System.AssertException:Assertion failed:Expected :https://na1.salesforce.com/,Actual:https://na1.salesforce.com/.

 

Can somebody please help,It is urgently needed.

 

 

 

 Thanks,

Trick

  

public with sharing class CMSForceSetupController {

  Map<String, CMSForceSites__c> sitesettings;
  public Map<ID,Site> sitesmap {get;set;}
  public List<sitesetup> sitesetuplist {get;set;}
  public CMSForceDomain__c currenthost {get;set;}
  public Boolean settingssaved {get;set;}

  
  public CMSForceSetupController() {
    //get a Map of the configured Sites in this org
    sitesmap = new Map<ID,Site>([Select s.UrlPathPrefix, s.TopLevelDomain, s.Subdomain, s.Status, s.Name, s.MasterLabel, s.Id, s.Description From Site s where Status = 'Active' limit 25]);
    //get the custom settings that already might exist
    sitesettings = CMSForceSites__c.getAll();
    
    //drop the Sites in the setup list
    sitesetuplist = new List<sitesetup>();
    for(Site s:sitesmap.values()) {
      sitesetup ss = new sitesetup();
      ss.siteId = s.Id;
      ss.siteName = s.MasterLabel;
      //check if we already have a preview url for this site, if so : prefill
      String siteid = s.Id;
      String shortid = siteid.substring(0,15);
      CMSForceSites__c cmsfs = sitesettings.get(shortid);
      if(cmsfs != null) { 
        ss.sitePreviewUrl = cmsfs.Site_Url__c;
        ss.customsettingId = cmsfs.Id;
      }
      sitesetuplist.add(ss);
    }
    
    //check if we already have a configured instance
    currenthost = CMSForceDomain__c.getAll().get('cmsforcedomain');
    if(currenthost == null) currenthost = new CMSForceDomain__c(Name = 'cmsforcedomain');
  }
  
  //save the preview urls back into the custom settings
  public PageReference save() {
    try {
      List<CMSForceSites__c> customsettings = new List<CMSForceSites__c>();
      
      for(sitesetup ss:sitesetuplist) {
        CMSForceSites__c s = new CMSForceSites__c(Id = ss.customsettingId);
        s.Site_Url__c = ss.sitePreviewUrl;
        //preview url is required
        if(ss.sitePreviewUrl == null || ss.sitePreviewUrl.length() == 0) {
          ApexPages.addMessage(new ApexPages.Message(ApexPages.SEVERITY.ERROR, 'Please fill in the Preview Url address for each of the sites below'));
          return null;
        }
        s.Site_Name__c = ss.siteName;
        s.Site_Id__c = ss.siteId.substring(0,15);
        s.Name = ss.siteId.substring(0,15);
        customsettings.add(s);
      }
      if(currenthost.Url__c == null || currenthost.Url__c.length() == 0) {
          ApexPages.addMessage(new ApexPages.Message(ApexPages.SEVERITY.ERROR, 'Please fill in your Salesforce domain'));
          return null;
      }
      if(currenthost.Url__c.endsWith('/')) currenthost.Url__c = currenthost.Url__c.substring(0,currenthost.Url__c.length()-1);
      upsert customsettings;
      upsert currenthost;
      settingssaved = true;
    }
    catch(Exception ex) {
      ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, ex.getMessage()));
    }
    ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'Your settings have been saved. You can now continue using the console.'));
    return null;
  }
  
  //internal value object
  public class sitesetup {
    public String siteId {get;set;}
    public String customsettingId {get;set;}
    public String siteName {get;set;}
    public String sitePreviewUrl {
          get { return sitePreviewUrl; }
          set {
            if(value == null) {sitePreviewUrl = null; return;}
            //remove any trailing '/'
            if(value.endsWith('/')) {sitePreviewUrl = value.substring(0, value.length()-1);}
            else {sitePreviewUrl = value;}
          }
       }
    
  }
  
  
  /** TESTS **/
  private static testMethod void t1() {
    CMSForceSetupController csc = new CMSForceSetupController();
    //we should have at least one active Site
    System.assert(!csc.sitesetuplist.isEmpty());
    
    //get the first site setup and fill in a custom setting (provide trailing '/' to get the cleanup code to run)
    sitesetup ss = csc.sitesetuplist[0];
    ss.sitePreviewUrl = 'http://somesite.force.com/someprefix/';
    //and provide the instance we're running in
    csc.currenthost.Url__c = 'https://na1.salesforce.com/';
    csc.save();    
    if(CMSForceDomain__c.getAll().get('cmsforcedomain') != null) System.assertEquals(CMSForceDomain__c.getAll().get('cmsforcedomain').Url__c, 'https://na1.salesforce.com');    
    
  }

}

 

Hi Friends,

 

I have salesforce customer portal which is up and running and assignedd to the production.Now I have to add class and  visual force page to it..

 

I have developed page and apex class in sandbox.However,I am not able to test it as when portal customer logs in ,his inofmation such as firstname,lastname ,email has to be queried and  retrieved from the database .

 

My situation,  when customer registers on the portal his infomation is going directlty in the production .Now ,How do I ensure that when customer enter's his information on the portal then it can go to the test instance(sandbox) so that I can test my class and visual force page functionality.

 

Thanks in advance 

 

Thanks,

Trick

Hi Friends,

 

I have salesforce customer portal which is up and running and assignedd to the production.Now I have to add class and  visual force page to it..

 

I have developed page and apex class in sandbox.However,I am not able to test it as when portal customer logs in ,his inofmation such as firstname,lastname ,email has to be queried and  retrieved from the database .

 

My situation,  when customer registers on the portal his infomation is going directlty in the production .Now ,How do I ensure that when customer enter's his information on the portal then it can go to the test instance(sandbox) so that I can test my class and visual force page functionality.

 

Thanks in advance 

 

Thanks,

Trick

Hi Friends,

 

Can we assign events to calendars in salesforce and make it vsible on the calendar.Quick response will be greatly appreciated.

 

 

Thanks,

Trick

Hi,

I have created custom button on the event object and has also put that on the Page layout.However,when I click on the contact object and select record and then hit on create new button on the open activities related list I do not see custom button on the event page page.I only see default button's. What is that I am missing?

I have admin access so security will not be a problem.Can somebody please help or let me know the steps to create custom button ffor an event object.

Thanks,
G

Hi Friends,

 

I want to create PDF file from the record of an event object.Does anyone know how to go about it?

Can somebody please help?

 

If there is some example of how they have done it?

 

Thanks,

Trick

 

 

Hi Friends,

 

I have a situation in which i have customer portal and I have link on the customer portal which when clicked shyould take me to another web site.

 

I will be using rest based services.In this scenario

1)Which one isgoing to be client and which one is going to be server

2)In the remote settings what am i suppose to register

 

 

Please help

 

Thanks,

Trick

 

 

Hi Friends ,

 

How do we add content on the customer portal.I have good amount of text which I want to display on the customer portal

 

Any ideas?

 

Thanks,

Trick

Hi Friends,

I have customer portal implemented in Force.com platform.My question is
When some customer registers on customer portal and his information such as username and password is saved in salesforce.

Can the same portal user logs into the salesforce org using customer portal user name and password?


Can somebody please answer that?


Thanks,
Trick

Hi Friends,

 

I have enterprise org and the scenario is as follows:-

 

On the customer portal,I have a link when I click on the link it takes me to another online tool(Which is basically a site).On this site, customer can search for information and then he can save that infromation in the form of file or some report.My task is to save that information in salesforce in the form of PDF.

 

My question is that if we keep saving information in salesforce in the form of PDF file for so many customers.Won't that exceed data storage limit,at some point of time, in salesforce.

 

Using data storage as an example, an Enterprise Edition organization with 600 users would receive 12,000

MB (12 GB) of data storage, because 20 MB per user multiplied by 600 users is 12,000 MB

 

If anybody can advice me on that.What I am thinking make sense or not?.

 

Thanks,

Trick.