• JanitaB2
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I have overriden the New Task page with a custom VF page and Controller Extension.  When I implemented this, autocompletion on Subject stopped working in IE 8, which all my users have.  (It still works in Firefox and Chrome, but they are not allowed to use those.)  We need the standard autocompletion, not anything fancy.  Autocomplete still works on Subject on the Edit Task page, and on other pages, so it is not a browser setting.  (Though I did research all those.)

 

Anyone else have this problem?  Or do you see anything wrong in the code?

 

All help much appreciated!!

 

The code follows:

<apex:page id="thePage" standardController="Task" extensions="AddTaskExtension">
  <apex:form id="theForm">
     <apex:pageBlock title="Create new Task" id="theBlock">
        <apex:pageBlockButtons >                 
            <apex:commandButton action="{!Save}" value="Save"  /> 
            <apex:commandButton action="{!Cancel}" value="Cancel" />
        </apex:pageBlockButtons>
        <apex:pageMessages />
        <apex:actionStatus id="workStatus" startText=" working..." stopText=""/>   
        <apex:actionRegion > 
          <apex:pageBlockSection title="Task Info" columns="2">
             <apex:inputField value="{!task.Subject}" />
             <apex:inputField value="{!task.OwnerId}" />
             <apex:pageBlockSectionItem > 
               <apex:outputLabel value="Type"/>
               <apex:outputPanel > 
                 <apex:inputField value="{!task.Type}" >
                     <apex:actionSupport event="onchange" rerender="theBlock" status="tStatus"/>
                 </apex:inputField>
                 <apex:actionStatus startText="working... " id="tStatus" />
             </apex:outputPanel>
             </apex:pageBlockSectionItem>
             <apex:inputField value="{!task.WhatId}" />
             <apex:inputField value="{!task.ActivityDate}" />
             <apex:inputField value="{!task.WhoId}" />
             <apex:inputField value="{!task.Priority}" />
             <apex:inputField value="{!task.Log_a_Call__c}" />
             <apex:inputField value="{!task.Status}" />
             <apex:inputField value="{!task.Control_Center_Offered__c}" />
             <apex:inputField value="{!task.Send_to_Legacy_Systems__c}" />
          </apex:pageBlockSection>
          <apex:pageBlockSection columns="1" >
             <apex:inputTextarea value="{!task.Description}" label="Comments" cols="100" rows="8"/>
             <apex:inputField value="{!task.Send_Summary_to_Legacy__c}" />
             <apex:inputTextarea value="{!task.ActivitySummary__c}" cols="100" rows="3"/>
          </apex:pageBlockSection>
          <apex:pageBlockSection title="Payment Info" columns="1" rendered="{!task.Type == 'Payment' || task.Type == 'Promise to Pay' }">
             <apex:inputField value="{!task.Promised_Payment_Date__c}" />
             <apex:inputField value="{!task.Payment_Type__c}" />
             <apex:inputField value="{!task.Promised_Payment_Amount__c}" />
             <apex:inputField value="{!task.Internal_PTP__c}" />
          </apex:pageBlockSection>
          <apex:pageBlockSection title="Payment Investigation Info" columns="1" rendered="{!task.Type == 'Misapplied Payment Research'}">
             <apex:inputField value="{!task.PI_by_Collector__c}" />
             <apex:inputField value="{!task.PI_Sent_to_RPS__c}" />
             <apex:inputField value="{!task.Payment_Investigation_Amount__c}" />
          </apex:pageBlockSection>
          <apex:pageBlockSection title="Pending Adjustment Info" columns="1" rendered="{!task.Type == 'Pending Adjustment'|| task.Type =='Dispute'}">
             <apex:inputField value="{!task.Pending_Adjustment_Amount__c}" />
          </apex:pageBlockSection>
          <apex:pageBlockSection title="Write-off Info" columns="1" rendered="{!task.Type == 'Write-off'}">
             <apex:inputField value="{!task.Write_off_Amount__c}" />
             <apex:inputField value="{!task.Write_off_Reason__c}" />
          </apex:pageBlockSection>
        </apex:actionRegion>
     </apex:pageBlock> 
   </apex:form>         
</apex:page>

public class AddTaskExtension {
   private Task task;
   public String RelatedType { get; set; }
   
   public AddTaskExtension(ApexPages.StandardController stdController) {
      this.task = (Task)stdController.getRecord();
      task.ownerId = UserInfo.getUserId();
      
      Id passedWhoId = ApexPages.currentPage().getParameters().get('who_id'); 
      if ( passedWhoId != null ) {
          try {
             Contact result = [ Select Id from Contact where id = :passedWhoId ]; 
             task.WhoId = passedWhoId ;
          }
          catch (QueryException e) {
             task.WhoId = null;
          }
      }   

      String passedSubject = ApexPages.currentPage().getParameters().get('tsk5'); 
      if ( passedSubject != null ) {
             task.Subject = passedSubject ;
      }   

   }
   
   public PageReference save() {
   
       if (task.ActivityDate == null) {
           task.ActivityDate = System.Today();
       }
   
       if ((task.Send_Summary_to_Legacy__c || task.Send_to_Legacy_Systems__c) && task.WhatId == null ) {
            task.Send_Summary_to_Legacy__c = false;
            task.Send_to_Legacy_Systems__c = false;
       }
       try {
          insert task;
          // begin logic to add a Legacy Note if only 1 billing account 
          PageReference p;
          if (task.WhatId != null && (task.Send_Summary_to_Legacy__c || task.Send_to_Legacy_Systems__c)) {
             Task mytask = [Select WhatId, What.Type from Task where id = :task.Id];
             if (mytask.what.type != null ) 
                 //ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO,'What type: '+ task.what.type));        
                 RelatedType = mytask.What.Type; 
             else 
                 RelatedType = 'No What'; 
              
             if (RelatedType == 'Case' || RelatedType == 'Account' || RelatedType == 'Billing_Account__c') { 
                String result = CountBAforTask.CountBAs(task.Id); 
                if (result.substring(0,2) == 'OK') { 
                    p = new PageReference('/apex/SelectBillingAcctForNote?id=' + task.Id);
                    return p;
                }
             }
          }

          p = new PageReference('/' + task.Id);
          return p;

       } catch (DMLException ex) {
          return null;  
       } catch (Exception e) {
          ApexPages.addMessages(e);
          return null;  
       }         
  
  }
}

 

 

Not well documented, but important for testing!

 

How to connect to the Sandbox:

Exit Outlook, Communicator

Navigate to “C:\Documents and Settings\<<user_name>>\Application Data\salesforce.com

                Delete the “.Salesforce.com” folder   (the dot is important!!)

Open Regedit

Navigate to HKEY_CURRENT_USER\Software\Salesforce.com\SM folder and click on it

Locate ResourceURL on right side, double click on it, and change its value to:

                https://cs2.salesforce.com   (can use your instance or cs1)

Locate ServerURL on right side, double click on it, and change its value to:

                https://test.salesforce.com/services/Soap/c/22.0

Close Windows Registry Editor

Open Outlook, click on Tools > Salesforce.com Options

Update username and password with Sandbox username and password

Click Verify

Click OK to Success message (or if error, correct username or password)

 

Values for Production:

Locate ResourceURL on right side, double click on it, and change its value to:

                https://na4.salesforce.com  (can use your instance or na1)

Locate ServerURL on right side, double click on it, and change its value to:

                https://www.salesforce.com/services/Soap/c/22.0

 (Procedure is the same)

Because it's tricky and not well documented, here is a tested procedure for a full clean uninstall. 

 

  1. Close Outlook and Communicator; and Office Products; verify closed with Task Manager.
  2. From Control Panel, Click on Add/Remove Programs
  3. Locate “Salesforce Outlook Edition 3” and click REMOVE.  Close Add/Remove Programs.
  4. Go in regedit
  5. Navigate to “HKEY_CURRENT_USER >> SOFTWARE”
    • Delete the “Redemption” folder
    • Click on SALESFORCE.COM
    • Delete the “SM” folder  (right-click, Delete)
  6. Navigate to “HKEY_LOCAL_MACHINE >> SOFTWARE”
    • Delete the “Redemption” folder
    • Click on SALESFORCE.COM
    • Delete the “SM” folder, if exists  (right-click, Delete)
  7. Close regedit.
  8. Open up Explorer (right-click Start, select Explorer)
  9. Navigate to “C:\Documents and Settings\<<user_name>>\Application Data\salesforce.com
  10. Delete the “SM” folder
  11. Delete the “.Salesforce.com” folder   (the dot is important!!)

Now you can reinstall Connect for Outlook if desired.

I have customized the O_Dictionary.xml file for Connect for Outlook, which controls the user access options and settings in Connect for Outlook.  None of my current users have installed Connect for Outlook yet.  I would like to repackage the Connect for Outlook msi file, including my custom xml file instead of the standard one, and distribute the new msi file to the users.

 

Has anyone done this?  Can you give me some advice about it?  I am not in IT, and cannot use their software distribution system to distribute the software and the updated xml file (too bad).

 

Thanks for your help!

Hello,  I wish to use the following scenario but I'm not 100% sure if ti will work.

 

- I call a javascript function from a href ink in my visualforce page.

- within the javascript function a variable is set.

- in an apex:outputLabel  (for starters but I will need ot access the variable elsewhere)  the value comes from the variable I set in the javascript function.

 

Can this scenario be done?

 

I note the scenario can be done the opposite way around (Javascript can get a value from a visualforce component)   View $Component in http://www.salesforce.com/us/developer/docs/pages/Content/pages_variables_global.htm  but can the scenario I require be carried out?

 

Thanks in advance.

 

Hi,

 

I am trying to deploy from sandbox to production and it is complaining about not being able to rename standard profiles.

 

The only way I can deploy it is to untick these profiles:

 

Guest License

Chatter Free

Chatter Moderator

Chatter External

 

Surely these profiles should be exactly the same on both systems?

 

I thought at first it must be a version clash, but no, both systems have the winter 12 penguin logo.

 

Any ideas?

 

Thanks

  • January 06, 2012
  • Like
  • 0

Can't login with Data Loader to my sandbox even using a reset token with passwd.

 

Can't use wizard to load records as Admin because the object list is blank. Yes, I checked that the object is no

longer in development and is deployed.

 

As Admin I have all the access rights.

 

Why, therefore, can I not login with Data Loader and not use the custom object wizard? Why doesn't the object show up?

 

Anyone? Anyone?

  • January 04, 2012
  • Like
  • 0

How could validation rules apply for the salesforce Outliook?

 

thank you

  • January 03, 2012
  • Like
  • 0

Hi Everyone,

I Am using a tool called as Connect for Microsoft Outlook. I have established a connection from Outlook to salesforce. Also when I enter an email address in Outlook I am getting the corresponding contact in Salesforce with this email address but when I transfer the email from Outlook to Salesforce Contact, then it creates the error
" Contact your administrator to confirm that you have access to activites in Salesforce.com . You appear to only have Read only access to tasks."
But when I checked Its shows public read write access.

this similar functionality called email to Case is working fine which creates a Salesforce Case. But somehow adding mail message from Outlook to corresponding contact does not appear to work.

So Plz guys help me on this issue.

Thanks,
Rajiv

  • December 22, 2011
  • Like
  • 0

Hi,

 

I have a list of cases and want to implement a "take next case" button.

Since there are several views using different queues and filters I need to get the current view query so that I can pick the first one.

I thought about doing this with a custom javascript button.

 

Any ideas??

Anyone have problems installing or running the Force IDE on windows XP?

After installing i get errors:

 

JVM terminated exit code= -1

-Dfile.encoding=UTF-8

-Xms256m

-Xmx1024m

 

etc...

 

Any ideas?