• trick1
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi All,

I know this is not the right thread for my questiom.However,I am putting it so that somebody can help me as soon as possible.

How can I retrieve login information for the last couple of months such as username and number of logins?.I do not want  to go to login history to get that information as I can see mor than 20 thousand  logins and I do not want to look for every field and then calculate manually the total number of logins.Is there a way to fo this.Is is possiblle to do it through dashboard etc.?

Hi All,

 

How can I retrieve login information for the last couple of months such as username and number of logins?.I do not want  to go to login history to get that information as I can see mor than 20 thousand  logins and I do not want to look for every field and then calculate manually the total number of logins.Is there a way to fo this.Is is possiblle to do it through dashboard etc. 

 

 

Hi All,

 

I am trying to integrate salesforce with salesforce.I have generated wsdl to apex using enterprise wsdl.Now in the another org when I try to connect using salesforce login API,I am able to connect and then I am setting up headers so that I can call more api's.However,I have to pass new URL after retrieving it from the s object of the soap class.However,I am not able to figure out how to send this URL while calling more API's .Can somebody help?

 

 

enterpriseSoapSforceCom.LoginResult lr=new enterpriseSoapSforceCom.LoginResult();
enterpriseSoapSforceCom.soap s=new enterpriseSoapSforceCom.soap();

lr=s.login('Craig@yahoo.com',Lastric);
String g=lr.sessionid;
System.debug('The value of the session id in the new variable s is'+g);
//string url=lr.serverurl;
//lr.serverurl;
//system.debug('The value of the url in the new variable s is'+url);
s.inputHttpHeaders_x = new Map<String, String>();
//Setting a basic authentication header
s.inputHttpHeaders_x.put('Authorization', 'g');//Here i am supplying the session id
//s.inputHttpHeaders_x .put('New Url',url);//Here I tried to pass the URL in the header but it di not work.
enterpriseSoapSforceCom.QueryResult qResult=new enterpriseSoapSforceCom.QueryResult();
qResult = null;

String soqlQuery='SELECT name FROM Contact';
qResult = s.query(soqlQuery);
System.debug('The value of the contact object opp is'+qResult);



 

 

 

 

 

 

public class enterpriseSoapSforceCom {
    public class getUserInfo_element {
        private String[] apex_schema_type_info = new String[]{'urn:enterprise.soap.sforce.com','true','

false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class LoginResult {
        public String metadataServerUrl;
        public Boolean passwordExpired;
        public Boolean sandbox;
        public String serverUrl;
        public String sessionId;
        public String userId;
        public enterpriseSoapSforceCom.GetUserInfoResult userInfo;
        private String[] metadataServerUrl_type_info = new String[]{'metadataServerUrl','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] passwordExpired_type_info = new String[]{'passwordExpired','http://www.w3.org/2001/XMLSchema','boolean','1','1','false'};
        private String[] sandbox_type_info = new String[]{'sandbox','http://www.w3.org/2001/XMLSchema','boolean','1','1','false'};
        private String[] serverUrl_type_info = new String[]{'serverUrl','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] sessionId_type_info = new String[]{'sessionId','http://www.w3.org/2001/XMLSchema','string','1','1','true'};
        private String[] userId_type_info = new String[]{'userId','urn:enterprise.soap.sforce.com','ID','1','1','true'};
        private String[] userInfo_type_info = new String[]{'userInfo','urn:enterprise.soap.sforce.com','GetUserInfoResult','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'urn:enterprise.soap.sforce.com','true','false'};
        private String[] field_order_type_info = new String[]{'metadataServerUrl','passwordExpired','sandbox','serverUrl','sessionId','userId','userInfo'};
    }
    
    public class Soap {
        public String endpoint_x = 'https://login.salesforce.com/services/Soap/c/28.0/0DFi0000000PCEo';
        public Map<String,String> inputHttpHeaders_x;
        public Map<String,String> outputHttpHeaders_x;
        public String clientCertName_x;
        public String clientCert_x;
        public String clientCertPasswd_x;
        public Integer timeout_x;
        public enterpriseSoapSforceCom.QueryOptions_element QueryOptions;
        public enterpriseSoapSforceCom.EmailHeader_element EmailHeader;
        public enterpriseSoapSforceCom.DebuggingInfo_element DebuggingInfo;
        public enterpriseSoapSforceCom.MruHeader_element MruHeader;
        public enterpriseSoapSforceCom.PackageVersionHeader_element PackageVersionHeader;
        public enterpriseSoapSforceCom.SessionHeader_element SessionHeader;
        public enterpriseSoapSforceCom.UserTerritoryDeleteHeader_element UserTerritoryDeleteHeader;
        public enterpriseSoapSforceCom.LoginScopeHeader_element LoginScopeHeader;
        public enterpriseSoapSforceCom.AllowFieldTruncationHeader_element AllowFieldTruncationHeader;
        public enterpriseSoapSforceCom.DebuggingHeader_element DebuggingHeader;
        public enterpriseSoapSforceCom.AllOrNoneHeader_element AllOrNoneHeader;
        public enterpriseSoapSforceCom.LocaleOptions_element LocaleOptions;
        public enterpriseSoapSforceCom.OwnerChangeOptions_element OwnerChangeOptions;
        public enterpriseSoapSforceCom.AssignmentRuleHeader_element AssignmentRuleHeader;
        public enterpriseSoapSforceCom.DisableFeedTrackingHeader_element DisableFeedTrackingHeader;
        public enterpriseSoapSforceCom.StreamingEnabledHeader_element StreamingEnabledHeader;
        private String QueryOptions_hns = 'QueryOptions=urn:enterprise.soap.sforce.com';
        private String EmailHeader_hns = 'EmailHeader=urn:enterprise.soap.sforce.com';
        private String DebuggingInfo_hns = 'DebuggingInfo=urn:enterprise.soap.sforce.com';
        private String MruHeader_hns = 'MruHeader=urn:enterprise.soap.sforce.com';
        private String PackageVersionHeader_hns = 'PackageVersionHeader=urn:enterprise.soap.sforce.com';
        private String SessionHeader_hns = 'SessionHeader=urn:enterprise.soap.sforce.com';
        private String UserTerritoryDeleteHeader_hns = 'UserTerritoryDeleteHeader=urn:enterprise.soap.sforce.com';
        private String LoginScopeHeader_hns = 'LoginScopeHeader=urn:enterprise.soap.sforce.com';
        private String AllowFieldTruncationHeader_hns = 'AllowFieldTruncationHeader=urn:enterprise.soap.sforce.com';
        private String DebuggingHeader_hns = 'DebuggingHeader=urn:enterprise.soap.sforce.com';
        private String AllOrNoneHeader_hns = 'AllOrNoneHeader=urn:enterprise.soap.sforce.com';
        private String LocaleOptions_hns = 'LocaleOptions=urn:enterprise.soap.sforce.com';
        private String OwnerChangeOptions_hns = 'OwnerChangeOptions=urn:enterprise.soap.sforce.com';
        private String AssignmentRuleHeader_hns = 'AssignmentRuleHeader=urn:enterprise.soap.sforce.com';
        private String DisableFeedTrackingHeader_hns = 'DisableFeedTrackingHeader=urn:enterprise.soap.sforce.com';
        private String StreamingEnabledHeader_hns = 'StreamingEnabledHeader=urn:enterprise.soap.sforce.com';
        private String[] ns_map_type_info = new String[]{'urn:fault.enterprise.soap.sforce.com', 'faultEnterpriseSoapSforceCom', 'urn:enterprise.soap.sforce.com', 'enterpriseSoapSforceCom', 'urn:sobject.enterprise.soap.sforce.com', 'sobjectEnterpriseSoapSforceCom'};
        public enterpriseSoapSforceCom.SearchResult search_x(String searchString) {
            enterpriseSoapSforceCom.search_element request_x = new enterpriseSoapSforceCom.search_element();
            enterpriseSoapSforceCom.searchResponse_element response_x;
            request_x.searchString = searchString;
            Map<String, enterpriseSoapSforceCom.searchResponse_element> response_map_x = new Map<String, enterpriseSoapSforceCom.searchResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'urn:enterprise.soap.sforce.com',
              'search',
              'urn:enterprise.soap.sforce.com',
              'searchResponse',
              'enterpriseSoapSforceCom.searchResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.result;
        
            public enterpriseSoapSforceCom.LoginResult login(String username,String password) {
            enterpriseSoapSforceCom.login_element request_x = new enterpriseSoapSforceCom.login_element();
            enterpriseSoapSforceCom.loginResponse_element response_x;
            request_x.username = username;
            request_x.password = password;
            Map<String, enterpriseSoapSforceCom.loginResponse_element> response_map_x = new Map<String, enterpriseSoapSforceCom.loginResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              '',
              'urn:enterprise.soap.sforce.com',
              'login',
              'urn:enterprise.soap.sforce.com',
              'loginResponse',
              'enterpriseSoapSforceCom.loginResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.result;
        }
            
            
        }
        
        
        }

 

 

 

 

 

 

Hi All,

 

Below given is my code and I am just trying to make my concept clear.I rran a small example using anonymous block but it is giving me some error.

 

I have created class and function in which I am upserting an opportunity based on the  external id which I am passing to the the called functiuon of the class named test with teh string parameter and in the class i am assigning this to the external id field and then uosetting opporunity using the external id field.However,it gives and error which is given below at the end of the code.Can somebody pleease help? 

 

public class TestClass
{
   string m;     
public void test(string number1)
{
    m=number1;
    System.debug('The value in the variable of type m is'+m);
        opportunity opp=new opportunity(name='straw');
        opp.External_Id1__c=m;
        System.debug('The value passed to the field External_Id1__c is'+opp.External_Id1__c);
        try
        {
               upsert opp External_Id1__c;  
            
        }
        catch (DmlException e)
        {
            
                System.debug(e.getMessage());
            
        }
    
    }
}



TestClass t=new TestClass();
t.test('chris');


line 2, column 1: Method does not exist or incorrect signature: [TestClass].test(String)

 

 

 

 

 

 

Hi,

 

Scenario:-is Posting data to web service.

 

If I call  rest based web service written in Apex from outside salesforce and pass some parameters to it .Do I have to parse those parameters before I query data in salesforce.I am only posting data,therefore,can I query salesorce without parsing data.

 

The rest based web services can use json format and when we send request data to the web service the response which we get has to be parsed before we do something more with data.

 

 

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 need to write test class for the below given class.Can somebody tell me how to go about it.?

I know I have to use @Tests keyword.But I am looking for more than this.

 

public class hermi
{
public User u;
public Contact c;
public hermi()
{
User u;
Contact c;
u=[select username,contactid from user where id='005c0000000Et6I'];

c=[select name,email,firstname,lastname from contact where id=:u.contactid];
//System.debug('The value in the user object 'u' is'+u.username);
System.debug('The value in the user object is'+u.contactid);

System.debug('The value in the contact object of type contact is'+c);
System.debug('The value in the variable of contact type issajkdskjdkjdksadksad'+c.email);
//System.debug('The value in the variable of type issajkdskjdkjdksadksad'+c.firstname);
//System.debug('The value in the variable of type issajkdskjdkjdksadksad'+c.lastname);
}
public contact getcontact()
{
return c;
}
public User getuser()
{
return u;
}
}

 

 

Thanks,

Trick

Hi Guys,

 

Can we host flex application in salesforce.If not why ,Can somebody answer.

 

Thanks,

Chinglish

Hi Guys,

 

 

Can we host flex application in salesforce.If not why ,Can somebody answer.

 

Thanks,

Chinglish

Hi Friends,

 

I have system admin profile assigned to couple of people in the company.Another user has been added to the system and assigned system admin profile.Can I make changes to the system admin profile for this particular user and let him have access to the less objects or other information when he logins whereas allowing other users to have access to all the system admin information(With no rectriction to them)?.

 

Thanks,

Chinglish

Hi Friends,

 

I have system admin profile assigned to couple of people in the company.Another user has been added to the system and assigned system admin profile.Can I make changes to the system admin profile for this particular user and let him have access to the less objects or other information when he logins whereas allowing other users to have access to all the system admin information(With no rectriction to them)?.

 

Thanks,

Chinglish

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 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 Friends,

 

I have a question if somebody has written rest based services in .net and I want to consume in my salesforce org.Do I need WSDl file or in rest api concept of wsdl files does not exists?.

 

Can somebody please help?

 

Thanks,

Trick

 

  • April 11, 2012
  • Like
  • 0

Hi Friends,

 

I have salefroce and salesforc portal. I need to check in the salesforce database whether the person exists in salesforce or nor when somebody tries to register itself on the portal.

 

 

Can somebody give me some idea or if somebody has done something similar before?.

 

Thanks,

Trick

 

 

 

  • April 10, 2012
  • Like
  • 0

Hi Friends,

 

I want to call login api of salesforce  from the client so that I can login to salesforce by passing username,password and security token and then establish session and then query information from saleforce and store it in another system

 

I know either I have to write helper class or use enterprise wsdl and then use login API to do login and establish session.

 

I do not want to write enterprise wsdl rather I want to  use enterprise wsdl .However,When I try to download it deom saleforce.I do not see anything there..How do I get it,can somebody please advise

 

Thanks,

Trick

 

 

  • April 05, 2012
  • Like
  • 0

Hi Friends,

 

I want to call login api of salesforce  from the client so that I can login to salesforce by passing username,password and security token and then establish session and then query information from saleforce and store it in another system

 

I know either I have to write helper class or use enterprise wsdl and then use login API to do login and establish session.

 

I do not want to write enterprise wsdl rather I want to  use enterprise wsdl .However,When I try to download it deom saleforce.I do not see anything there..How do I get it,can somebody please advise

 

Thanks,

Trick

 

 

  • April 05, 2012
  • Like
  • 0

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

 

 

  • April 03, 2012
  • Like
  • 0

Hi Friends,

 

Consumer Key
Consumer Secret

I need to know,for example, when I register some website in the remote setting in salesforce in order to make callouts.
Consumer Key means what Does it belongs to salesforce or the website which was registered in salesforce.


Is it same about consumer secret.
Can somebody please explain with an example ?.

 

Thanks

Trick

  • March 29, 2012
  • Like
  • 0

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

  • May 09, 2012
  • Like
  • 0

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

 

 

  • May 07, 2012
  • Like
  • 0

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

 

 

  • April 03, 2012
  • Like
  • 0

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

  • March 28, 2012
  • Like
  • 0

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

  • March 27, 2012
  • Like
  • 0

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. 

  • March 22, 2012
  • Like
  • 0