• kickingboy
  • NEWBIE
  • 80 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 32
    Replies

Hi,

I've previously posted regarding recursive data structures. But, as it now turns out, it's still causing me some headache.

What I want to model is a many-to-many relationship between the same custom object.

My scenario is this:

I have a custom object called Sales Product. Any Sales Product has a Type of either Subscription, One-Time Fee or Bundle.

Now, the issue is this. In my data model a Sales Product of Type Bundle holds a list of other Sales Products (where Type isn't Bundle). However, these Sales Products (where Type isn't Bundle) must be able to be part of many bundles which brings me back to a many-to-many relationship between Sales Product and Sales Product.

When reading through the documentation of many-to-many relationships the followint is stated: "You cannot create a many-to-many self relationship, that is, the two master-detail relationships on the junction object cannot have the same master object."

I'm guessing it's exactly that sentence that's preventing me from creating a many-to-many relationship between 2 x Sales Product.

A recursive data structure is fairly common these days. Is there any known workaround for this limitation which would help me overcome my headaches?

Thanks.

 

/Søren Nødskov Hansen

A manager wants to approve his own approval requests. Seems strange but they are a small team and the manager as well as the sales guys own opportunities and the manager wants to be able demonstrate that his own opportunities have been subjected to the same approval process. 

 

Alternatively Manager A can approve Manager B requests and Manager B can approve Manager A requests.

 

Neither seem possible using the Manager field.

 

Any ideas?

 

 

Does anyone know how to override the Export Details and Printable View buttons on the Report tab? I have been told by a colleague that he has seen it done in a previous life but I cannot find any reference to this in either Help or the forums

How can I detect when a custom link has been clicked so that I can update a field? For example if someone clicks on the google maps link on Account. Happy to do some preprocessing before passing the data through to the URL but I cant think of a solution.

Salesforce.com Admin Bootcamp

Is this course for you?

Salesforce.com Admin Bootcamp is designed to get new salesforce.com System Administrators up to speed with the basics of salesforce.com system administration.

It is not designed to replace the salesforce.com Administration Essentials course but we have found that in order to get the most out of that course new adminstrators need to get some hands on experience first, BUT they often need a little jump start t to have the confidence to get started. This course meets that need.

OR if you have been given the job of Assistant Systems Administrator, perhaps taking over when the main Adminstrator is on holiday. This is the course for you.

 

Cost

The fee for this course including lunch is £350 plus VAT. Payable in advance.

 

Where

IT Training Room

C/O Progressive Training & Development Ltd
202 Blackfriars Road
Southwark

London
SE1 8NJ

Location Map

 

When

The next course will be held on the 8th September 2010. The day after Cloudforce London 2010. Call us on 01246 267761 for information on other dates or bookmark our website for updates. There are 4 places left on this course.

 

Course Agenda

 

  • Course Overview  9.00 - 9.15
  • How to use Help and Training 9.15 - 9.30
  • Salesforce CRM Overview 9.30 - 9.45
  • Custom fields 9.45 - 10.30
    • Different types of Custom fields
    • Set up a Custom field
    • Create and modify a Dependent Picklist
    • Create and modify a Lookup field
    • Create and modify a formula field
  • Page Layouts 10.30 - 11.00
    • The elements within a Page Layout
    • Create and modify a Page Layout
    • Customize a related List
    • Create and modify a record type
    • Set up field-Level Security
  • Break 11.00 - 11.15
  • Data Validation  11.15 - 11.30
    • Create Data Validation rules
  • Workflow 11.30 -12.00
    • Differences between immediate and time-dependent Workflow
      actions
    • Set up a Workflow rule and associated actions
  • Custom Objects, Applications, & Tabs 12.00 - 12.30
    • Create a Custom object
    • Create a Custom object tab
    • Create a Custom app
  • Lunch 12.30 - 13.00
  • User Management  13.00 - 13.30
    • Information captured on the User record
    • Create and maintain User records
  • Profiles 13.30 - 14.00
    • What a Profile controls
    • Managing profiles
    • When to create a Custom Profile
  • Record Sharing 14.00 -  14.45
    • Record owner concept
    • Elements of the Sharing model
    • The use of Roles 
    • Building Sharing rules
  • Break 14.45 - 15.00
  • Data Management 15.00 - 16.00
    • The function of an external ID
    • The different tools for data migration
    • Data import wizard
    • When to use the Data Loader

I use the following VF code create an editable collection of fields in a section on the page layout of a a custom object. When I first open the record it renders the section  correctly as the first image below but when I press the save button it displays the whole of the screen in the section as in the second page. If I refresh the enclosing record it renders the section correctly. 

 

apex:page standardController="Compliance__c" showHeader="false" tabstyle="Compliance__c" sidebar="false"> <apex:form > <apex:pageBlock mode=""> <apex:outputLabel value="Policy Holder"/> <apex:inputField value="{!Compliance__c.ZName__c}"/> <apex:outputLabel value="IDD"/> <apex:inputField value="{!Compliance__c.Z1__c}"/> <apex:outputLabel value="Price"/> <apex:inputField value="{!Compliance__c.Z2__c}"/> <apex:outputLabel value="Complete"/> <apex:inputField value="{!Compliance__c.Z3__c}"/> <p/> <apex:outputLabel value="Policy Holder"/> <apex:inputField value="{!Compliance__c.ZName__c}"/> <apex:outputLabel value="IDD"/> <apex:inputField value="{!Compliance__c.Z1__c}"/> <apex:outputLabel value="Price"/> <apex:inputField value="{!Compliance__c.Z2__c}"/> <apex:outputLabel value="Complete"/> <apex:inputField value="{!Compliance__c.Z3__c}"/> <p/> <apex:commandButton value="Save Field Values" action="{!save}"/> </apex:pageBlock> </apex:form> </apex:page>

 

 

 

I need to write a report to identify all the users not logged in the last 7 days  via the browser and I cannot think of any criteria that will give me the result I want because last login includes Outlook sync.

I have 50 dashboards each with 10 components. Each dashboard analyses a particular territory. At the moment I  need to only maintain 10 reports to drive all 50 dashboards because there is a 1 to 1 correspondence between territory and user so I can set each dashboard to the appropriate running user and use the My records filter in the report. In future however it may be that every territory does not have an associated user so I would be faced with maintaining 500 reports. I was just wondering if anyone can think of a way of passing a value from the dashboard to the report so that it can filter on the appropriate territory. Or any other solution that has the same effect.  

A previously working Visualforce page now generates the following error message 

 

An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@emea.salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using Salesforce! 

Error ID: 984984142-6331 (-2071334022)

 

Run a second time it generated

 

n internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@emea.salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using Salesforce! 

Error ID: 984984142-6374 (-2071334022)

I get nothing in the  debug log. I am guessing that the last 4 digits are the error occurrence and that 984984142 is the internal error code which indicates which part of the interpreter generated the exception. Anyone any idea what is causing this?

 

I have raised a case 02763249

 

 

<apex:page controller="EquipmentOrderController" tabStyle="Contract"> <apex:outputPanel id="invalidContent" rendered="{!NOT(isValid)}"> <apex:sectionHeader title="Order Equipment" subtitle=""/> <apex:outputPanel layout="block"> <apex:outputText value="The SLA must be approved before you can order equipment."/> <br/> <br/> <apex:outputLink value="/{!sla.Id}">Return to SLA</apex:outputLink> </apex:outputPanel> </apex:outputPanel> <apex:outputPanel id="noRowsContent" rendered="{!AND(isValid,NOT(hasOrderRecs))}"> <apex:sectionHeader title="Order Equipment" subtitle=""/> <apex:outputPanel layout="block"> <apex:outputText value="There is no equipment needed."/> <br/> <apex:outputLink value="/{!sla.Id}">Return to SLA</apex:outputLink> </apex:outputPanel> </apex:outputPanel> <apex:outputPanel id="validContent" rendered="{!AND(isValid,hasOrderRecs)}"> <apex:sectionHeader title="Order Equipment" subtitle="" description=""/> <br/> <apex:form > <apex:outputPanel layout="block"> <apex:outputText style="font-weight: bold" value="{!$Label.Equipment_Order_Point_of_Contact_Name}"/>&nbsp;&nbsp;<apex:outputText value="{!sla.Point_of_Contact__c}"/> </apex:outputPanel> <br/> <br/> <apex:pageBlock title="Equipment Needed"> <apex:pageBlockButtons location="top"> <apex:commandButton value="Order" action="{!order}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:variable var="i" value="0"/> <table class="list" border="0" cellpadding="0" cellspacing="0"> <tr class="headerRow"> <th scope="col" width="10%">Needed</th> <th scope="col" width="10%">New</th> <th scope="col" width="10%">Recovered</th> <th scope="col" width="60%">{!$ObjectType.Equipment_Needed__c.fields.Type__c.label}</th> <th scope="col" width="10%">&nbsp;</th> </tr> <apex:repeat value="{!orderLines}" var="line" id="orderLines"> <tr class="dataRow {!IF(MOD(VALUE(i),2)==0,'even','odd')} {!IF(VALUE(i)==(orderLines.size-1), 'last','')} {!IF(VALUE(i)==0,'first','')}"> <td class="dataCell">{!line.quantity}</td> <td class="dataCell">{!line.ordered}</td> <td class="dataCell">{!line.spacer}{!line.recovered}</td> <td class="dataCell">{!line.lineType}</td> <td class="dataCell"> <apex:commandLink value="Search" action="{!search}"> <apex:param name="searchIndex" value="{!i}" assignTo="{!searchIndex}" /> </apex:commandLink> </td> </tr> <apex:outputPanel rendered="{!line.recoveredEquipment.size > 0}"> <tr class="dataRow {!IF(MOD(VALUE(i),2)==0,'even','odd')} {!IF(VALUE(i)==(orderLines.size-1), 'last','')} {!IF(VALUE(i)==0,'first','')}"> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="2"> <table class="list" border="0" cellpadding="0" cellspacing="0" align="right"> <apex:variable var="j" value="0"/> <apex:repeat value="{!line.recoveredEquipment}" var="equipment"> <tr class="dataRow {!IF(MOD(VALUE(j),2)==0,'even','odd')} {!IF(VALUE(j)==(line.recoveredEquipment.size-1), 'last','')} {!IF(VALUE(j)==0,'first','')}"> <td class="dataCell"> <apex:commandLink value="Del" action="{!deleteRecoveredEquipment}"> <apex:param name="equipmentLineRemovalIndex" value="{!VALUE(i)}" assignTo="{!equipmentLineRemovalIndex}" /> <apex:param name="equipmentRemovalIndex" value="{!VALUE(j)}" assignTo="{!equipmentRemovalIndex}" /> </apex:commandLink> </td> <td class="dataCell">{!equipment.Name}</td> <td class="dataCell"><apex:outputField value="{!equipment.Store__c}"/></td> <td class="dataCell">{!ROUND(equipment.Store__r.Store_Number__c,0)}</td> <td class="dataCell">{!equipment.Status__c}</td> </tr> <apex:variable var="j" value="{!VALUE(j)+1}"/> </apex:repeat> </table> </td> </tr> </apex:outputPanel> <apex:variable var="i" value="{!VALUE(i)+1}"/> </apex:repeat> </table> </apex:pageBlock> <br/> <apex:pageBlock id="resultsBlock" rendered="{!AND(displayResults, searchResults.size>0)}"> <apex:pageBlockButtons location="top"> <apex:commandButton value="Request Selected" action="{!requestRecoveredEquipment}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!searchResults}" var="result" id="results" rowClasses="odd,even" styleClass="list"> <apex:facet name="caption"> <apex:outputText value="You searched for equipment of type - {!searchTerm}"/> </apex:facet> <apex:column > <apex:inputCheckbox value="{!result.isSelected}"/> </apex:column> <apex:column > <apex:facet name="header">Name</apex:facet> <apex:outputText value="{!result.name}"/> </apex:column> <apex:column > <apex:facet name="header">Distance (km)</apex:facet> <apex:outputText value="{!ROUND(result.distance,2)}"/> </apex:column> <apex:column > <apex:facet name="header">Store</apex:facet> <apex:outputLink value="/{!result.store.Id}">{!result.store.Name}</apex:outputLink> </apex:column> <apex:column > <apex:facet name="header">Store Number</apex:facet> <apex:outputText value="{!ROUND(result.store.Store_Number__c,0)}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> <apex:outputPanel layout="block" rendered="{!AND(displayResults, searchResults.size=0)}"> Sorry, your search returned no results. </apex:outputPanel> </apex:form> </apex:outputPanel></apex:page>

 

 

 

 

 

I am modifying a legacy org and often have the requirement to find out what Apex or workflows are impacted by a change to a field. If I try to delete the field I get a nice list but is there a more elegant way of identifying the dependencies?
If the subject field of the task on the lead conversion screen  has  data in it this causes a task to be created. I simply want to prepopulate this field to force a task creation but cannot see how to do it since this field does not appear to be able to be referenced. My rather clumsy alternative would be to write an Apex trigger which creates a task. Even then I can't test the field to ensure that two tasks are not created.

I know I can set the Do not create opportunity checkbox by using a custom convert button

with the following code

"/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1"

but can I prepopulate the subject field on the task with something similar to the following

"/lead/leadconvert.jsp?retURL=%2F{!Lead.Id}&id={!Lead.Id}&nooppti=1&Subject={!Lead.Company}"

In other words can I  find a list of parameters for leadconvert.jsp

I am trying to create VF page to mass edit and save a set of records. There is a pretty good discussion of the issue  here  

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=8058#M8058

 

but both my objects (parent and child) are custom objects and I just cannot make it work. For example there does not seem to be a Selected method for custom objects so just using a standard controller will not work but if I use an extension I get the error message Unknown constructor 'EventsList.EventsList(ApexPages.StandardController controller)' if I use the recordsetVar attribute

 

My apex is

 

public class EventsList {
    public EventsList(ApexPages.StandardSetController controller) {

    }


   
 public PageReference save() {
     
    return null;
 }





  public Service__c getService() {
    return [select id, name,
             (select id, name, Actual_Fee__c, Actual_days__c, Employee__c from ServiceEvents__r limit 200)
             from Service__c where id =
             :ApexPages.currentPage().getParameters().get('Id') ];
}

public String getName() {
  return 'Events List';
  }
}

 

My VF is 

<apex:page standardController="Service_Event__c"  recordsetVar ="scheds" extensions="EventsList"  id="updateOwnerPage" tabstyle="Schedules__tab" sidebar="false">
  <apex:pageBlock title="Hello {!$User.FirstName}!">
        You are displaying Schedules.
       
    </apex:pageBlock>
    <apex:form >
        <apex:pageBlock mode="edit">
            <apex:pageMessages />
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockTable value="{!Service.ServiceEvents__r}" var="a">
                <apex:column value="{!a.name}"/>                                           
                <apex:column headerValue="Actual Fee">
                    <apex:inputField value="{!a.Actual_Fee__c}"/>
                </apex:column>
                <apex:column headerValue="Actual days">
                    <apex:inputField value="{!a.Actual_days__c}"/>
                </apex:column>
                <apex:column headerValue="Employee">
                   <apex:inputField value="{!a.Employee__c}"/>
                </apex:column>
                </apex:pageBlockTable>
        </apex:pageBlock>
     </apex:form>
</apex:page>

 

 

What am I not understanding?

Hi
I have 2 custom objects Service and Service Event which have a master-detail relationship. Child relationship name is ServiceEvents.
 
When I try to save the following code I get the error message: Error: Invalid field ServiceEvents for SObject Service__c
 
<apex:page standardController="Service__c">
    <apex:pageBlock title="Hello {!$User.FirstName}!">
        You are displaying Schedules from the {!service__c.name} Service record.
    </apex:pageBlock>
    <apex:pageBlock title="Schedules">
        <apex:dataTable value="{!service__c.ServiceEvents}" var="a" cellPadding="4" border="1">
              <apex:column>
               <apex:facet name="header">Name</apex:facet>
                {!a.Name}
              </apex:column>
        </apex:dataTable>
    </apex:pageBlock>
    
</apex:page>
 
This seems functionally  identical to the following code which works perfectly (it should its out of the VF manual). What am I not understanding?
 
<apex:page standardController="Account">
   <apex:pageBlock title="Hello {!$User.FirstName}!">
      You are viewing the {!account.name} account.
   </apex:pageBlock>
   <apex:pageBlock title="Contacts">
      <apex:pageBlockTable value="{!account.Contacts}" var="contact">
         <apex:column value="{!contact.Name}"/>
         <apex:column value="{!contact.MailingCity}"/>
         <apex:column value="{!contact.Phone}"/>
      </apex:pageBlockTable>
   </apex:pageBlock>
</apex:page>
 
I want to display an address from the account object on on my VF page but this is not a referenceable field so I created a a custom field which concatenates street city postcode etc using BR() to separate them but it does not display correctly. Could someone tell me what I am missing?

How can I detect when a custom link has been clicked so that I can update a field? For example if someone clicks on the google maps link on Account. Happy to do some preprocessing before passing the data through to the URL but I cant think of a solution.

Salesforce.com Admin Bootcamp

Is this course for you?

Salesforce.com Admin Bootcamp is designed to get new salesforce.com System Administrators up to speed with the basics of salesforce.com system administration.

It is not designed to replace the salesforce.com Administration Essentials course but we have found that in order to get the most out of that course new adminstrators need to get some hands on experience first, BUT they often need a little jump start t to have the confidence to get started. This course meets that need.

OR if you have been given the job of Assistant Systems Administrator, perhaps taking over when the main Adminstrator is on holiday. This is the course for you.

 

Cost

The fee for this course including lunch is £350 plus VAT. Payable in advance.

 

Where

IT Training Room

C/O Progressive Training & Development Ltd
202 Blackfriars Road
Southwark

London
SE1 8NJ

Location Map

 

When

The next course will be held on the 8th September 2010. The day after Cloudforce London 2010. Call us on 01246 267761 for information on other dates or bookmark our website for updates. There are 4 places left on this course.

 

Course Agenda

 

  • Course Overview  9.00 - 9.15
  • How to use Help and Training 9.15 - 9.30
  • Salesforce CRM Overview 9.30 - 9.45
  • Custom fields 9.45 - 10.30
    • Different types of Custom fields
    • Set up a Custom field
    • Create and modify a Dependent Picklist
    • Create and modify a Lookup field
    • Create and modify a formula field
  • Page Layouts 10.30 - 11.00
    • The elements within a Page Layout
    • Create and modify a Page Layout
    • Customize a related List
    • Create and modify a record type
    • Set up field-Level Security
  • Break 11.00 - 11.15
  • Data Validation  11.15 - 11.30
    • Create Data Validation rules
  • Workflow 11.30 -12.00
    • Differences between immediate and time-dependent Workflow
      actions
    • Set up a Workflow rule and associated actions
  • Custom Objects, Applications, & Tabs 12.00 - 12.30
    • Create a Custom object
    • Create a Custom object tab
    • Create a Custom app
  • Lunch 12.30 - 13.00
  • User Management  13.00 - 13.30
    • Information captured on the User record
    • Create and maintain User records
  • Profiles 13.30 - 14.00
    • What a Profile controls
    • Managing profiles
    • When to create a Custom Profile
  • Record Sharing 14.00 -  14.45
    • Record owner concept
    • Elements of the Sharing model
    • The use of Roles 
    • Building Sharing rules
  • Break 14.45 - 15.00
  • Data Management 15.00 - 16.00
    • The function of an external ID
    • The different tools for data migration
    • Data import wizard
    • When to use the Data Loader

We are trying to get our products into our environment ready for launch on Tuesday of next week but we have hit a barrier that we don't have the skills or knowledge to cope with.

 

Is anyone available for paid work to help us between now and then?

 

Background:

We are a service company based int he UK that offers collection services. We use a network of contractors to carry out those services. The services can be in a combination of forms dependant on three things:

 

 

  1. Type of container (10 options)
  2. Size of container (10 options)
  3. Type of container cargo (10 options)
We collect from all over the UK and therefore choose a contractor based on the postcode of the Account Shipping Postcode. We may have a choice of between 1-4 contractors to use in that area - each offering a different price.
We believe we should be using Pricebooks according to the Postcode and then Container Type as the Product. The other items then become variables of that product ie:
Size of Container
Type of Container Cargo
Based on the chosen variables the system would return the possible contractors, which would give us the price

 

What we are looking to do is:

 

Build a Custom Object to manage our vendor services. This would be:

 

  • Vendor details (taken from Account)
  • Vendor postcodes covered - multi-select
  • Vendor containers offered in those Postcode areas
  • Vendor sizes offered
  • Type of Container Cargo offered
  • Price for each combination

 

 

Modify the Opportunity Product to add in the ability to select product variables as well as Quantity:

 

  •  Frequency of Collection
  •  Size of Container
  •  Type of Product

 

 

We then need a lookup to check which of our Vendors can match the product combination, which will then return a Price and the Vendor

 

Hope that makes sense. Would love to hear from anyone interested in this work who can begin immediately.

 

Philip

I need to write a report to identify all the users not logged in the last 7 days  via the browser and I cannot think of any criteria that will give me the result I want because last login includes Outlook sync.

HI

 

I am creating a formula field, in that contact name is required. But I am unable to find contact name field. It is displaying error screen "doesn't exist name field". Anybody have any idea why name field is not listed while creating name fiels.

 

Thanks.

  • August 19, 2010
  • Like
  • 0

Hi,

I've previously posted regarding recursive data structures. But, as it now turns out, it's still causing me some headache.

What I want to model is a many-to-many relationship between the same custom object.

My scenario is this:

I have a custom object called Sales Product. Any Sales Product has a Type of either Subscription, One-Time Fee or Bundle.

Now, the issue is this. In my data model a Sales Product of Type Bundle holds a list of other Sales Products (where Type isn't Bundle). However, these Sales Products (where Type isn't Bundle) must be able to be part of many bundles which brings me back to a many-to-many relationship between Sales Product and Sales Product.

When reading through the documentation of many-to-many relationships the followint is stated: "You cannot create a many-to-many self relationship, that is, the two master-detail relationships on the junction object cannot have the same master object."

I'm guessing it's exactly that sentence that's preventing me from creating a many-to-many relationship between 2 x Sales Product.

A recursive data structure is fairly common these days. Is there any known workaround for this limitation which would help me overcome my headaches?

Thanks.

 

/Søren Nødskov Hansen

I have 50 dashboards each with 10 components. Each dashboard analyses a particular territory. At the moment I  need to only maintain 10 reports to drive all 50 dashboards because there is a 1 to 1 correspondence between territory and user so I can set each dashboard to the appropriate running user and use the My records filter in the report. In future however it may be that every territory does not have an associated user so I would be faced with maintaining 500 reports. I was just wondering if anyone can think of a way of passing a value from the dashboard to the report so that it can filter on the appropriate territory. Or any other solution that has the same effect.  

Hi,

 

I was aking support:

"how can I define a field in account that shows "true" if at least one contact of this account has a certain value in an attribute?"

Answer was:
"This cannot be done due to the master child relationship between accounts and contacts."


In a programming language I would iterate over each child (contact) and set a boolean variable to true if the first contacts boolean variable is true. This is a pretty simple task and I am wondering why this is not possible.

If there qould be e.g. a Rollup Summary for to contacts-leads this would be a solution. It is not.

Does anyone have a comment for me?

 

Greetings

Sabine

Is there a work around for Workflows that Update Fields where the limit for the Formula is 3900.  I want to create an "IF" formula that would include 1800 cities in California with Sales tax Rates that would automatically update custom field we have in Opportunities called "Sales Tax Rate" (the formula I created is around 100,000 characters).   Does anyone know of any other way to apply sales tax to opportunities automatically depending on city/state???

I want to be able to calculate by default, the sales tax for california depending on the city the Account is located in...in the Opportunites page.   I have downloaded the cities and tax rates for california in a spreadsheet and want to incorporate in a formula for the default area in the sales tax field in Opportunities.   Keep in mind the names of the cities in California may be the same as other cities in other states, so we need to identify California as well.  Thanks.

Hi -

 

I am looking for the fastest way possible to mass delete all records for a given custom object. I developed a very simple Batch Apex class which is described below.  The code works but it performs very slowly. Yesterday it took 40 minutes to delete 34,000 records, although I did not run into any governor limits.  It seems that the execute() call is only receiving a few records at a time.  Is there any way to coax it to process large groups of records?

 

Any help would be greatly appreciated.

 

global class MassDeleteCustomObject implements Database.Batchable<Sobject>

{

  global final String query = 'select Id from <my custom object>';

 

  global Database.QueryLocator start(Database.BatchableContext BC)

  {

 

       return Database.getQueryLocator(query);

  }

 

    global void execute(Database.BatchableContext BC, List<Sobject> records)

   {

        delete records;

   }

 

  global void finish(Database.BatchableContext BC)

  {

  }

 

}

A previously working Visualforce page now generates the following error message 

 

An internal server error has occurred

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@emea.salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using Salesforce! 

Error ID: 984984142-6331 (-2071334022)

 

Run a second time it generated

 

n internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@emea.salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using Salesforce! 

Error ID: 984984142-6374 (-2071334022)

I get nothing in the  debug log. I am guessing that the last 4 digits are the error occurrence and that 984984142 is the internal error code which indicates which part of the interpreter generated the exception. Anyone any idea what is causing this?

 

I have raised a case 02763249

 

 

<apex:page controller="EquipmentOrderController" tabStyle="Contract"> <apex:outputPanel id="invalidContent" rendered="{!NOT(isValid)}"> <apex:sectionHeader title="Order Equipment" subtitle=""/> <apex:outputPanel layout="block"> <apex:outputText value="The SLA must be approved before you can order equipment."/> <br/> <br/> <apex:outputLink value="/{!sla.Id}">Return to SLA</apex:outputLink> </apex:outputPanel> </apex:outputPanel> <apex:outputPanel id="noRowsContent" rendered="{!AND(isValid,NOT(hasOrderRecs))}"> <apex:sectionHeader title="Order Equipment" subtitle=""/> <apex:outputPanel layout="block"> <apex:outputText value="There is no equipment needed."/> <br/> <apex:outputLink value="/{!sla.Id}">Return to SLA</apex:outputLink> </apex:outputPanel> </apex:outputPanel> <apex:outputPanel id="validContent" rendered="{!AND(isValid,hasOrderRecs)}"> <apex:sectionHeader title="Order Equipment" subtitle="" description=""/> <br/> <apex:form > <apex:outputPanel layout="block"> <apex:outputText style="font-weight: bold" value="{!$Label.Equipment_Order_Point_of_Contact_Name}"/>&nbsp;&nbsp;<apex:outputText value="{!sla.Point_of_Contact__c}"/> </apex:outputPanel> <br/> <br/> <apex:pageBlock title="Equipment Needed"> <apex:pageBlockButtons location="top"> <apex:commandButton value="Order" action="{!order}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:variable var="i" value="0"/> <table class="list" border="0" cellpadding="0" cellspacing="0"> <tr class="headerRow"> <th scope="col" width="10%">Needed</th> <th scope="col" width="10%">New</th> <th scope="col" width="10%">Recovered</th> <th scope="col" width="60%">{!$ObjectType.Equipment_Needed__c.fields.Type__c.label}</th> <th scope="col" width="10%">&nbsp;</th> </tr> <apex:repeat value="{!orderLines}" var="line" id="orderLines"> <tr class="dataRow {!IF(MOD(VALUE(i),2)==0,'even','odd')} {!IF(VALUE(i)==(orderLines.size-1), 'last','')} {!IF(VALUE(i)==0,'first','')}"> <td class="dataCell">{!line.quantity}</td> <td class="dataCell">{!line.ordered}</td> <td class="dataCell">{!line.spacer}{!line.recovered}</td> <td class="dataCell">{!line.lineType}</td> <td class="dataCell"> <apex:commandLink value="Search" action="{!search}"> <apex:param name="searchIndex" value="{!i}" assignTo="{!searchIndex}" /> </apex:commandLink> </td> </tr> <apex:outputPanel rendered="{!line.recoveredEquipment.size > 0}"> <tr class="dataRow {!IF(MOD(VALUE(i),2)==0,'even','odd')} {!IF(VALUE(i)==(orderLines.size-1), 'last','')} {!IF(VALUE(i)==0,'first','')}"> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td colspan="2"> <table class="list" border="0" cellpadding="0" cellspacing="0" align="right"> <apex:variable var="j" value="0"/> <apex:repeat value="{!line.recoveredEquipment}" var="equipment"> <tr class="dataRow {!IF(MOD(VALUE(j),2)==0,'even','odd')} {!IF(VALUE(j)==(line.recoveredEquipment.size-1), 'last','')} {!IF(VALUE(j)==0,'first','')}"> <td class="dataCell"> <apex:commandLink value="Del" action="{!deleteRecoveredEquipment}"> <apex:param name="equipmentLineRemovalIndex" value="{!VALUE(i)}" assignTo="{!equipmentLineRemovalIndex}" /> <apex:param name="equipmentRemovalIndex" value="{!VALUE(j)}" assignTo="{!equipmentRemovalIndex}" /> </apex:commandLink> </td> <td class="dataCell">{!equipment.Name}</td> <td class="dataCell"><apex:outputField value="{!equipment.Store__c}"/></td> <td class="dataCell">{!ROUND(equipment.Store__r.Store_Number__c,0)}</td> <td class="dataCell">{!equipment.Status__c}</td> </tr> <apex:variable var="j" value="{!VALUE(j)+1}"/> </apex:repeat> </table> </td> </tr> </apex:outputPanel> <apex:variable var="i" value="{!VALUE(i)+1}"/> </apex:repeat> </table> </apex:pageBlock> <br/> <apex:pageBlock id="resultsBlock" rendered="{!AND(displayResults, searchResults.size>0)}"> <apex:pageBlockButtons location="top"> <apex:commandButton value="Request Selected" action="{!requestRecoveredEquipment}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!searchResults}" var="result" id="results" rowClasses="odd,even" styleClass="list"> <apex:facet name="caption"> <apex:outputText value="You searched for equipment of type - {!searchTerm}"/> </apex:facet> <apex:column > <apex:inputCheckbox value="{!result.isSelected}"/> </apex:column> <apex:column > <apex:facet name="header">Name</apex:facet> <apex:outputText value="{!result.name}"/> </apex:column> <apex:column > <apex:facet name="header">Distance (km)</apex:facet> <apex:outputText value="{!ROUND(result.distance,2)}"/> </apex:column> <apex:column > <apex:facet name="header">Store</apex:facet> <apex:outputLink value="/{!result.store.Id}">{!result.store.Name}</apex:outputLink> </apex:column> <apex:column > <apex:facet name="header">Store Number</apex:facet> <apex:outputText value="{!ROUND(result.store.Store_Number__c,0)}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> <apex:outputPanel layout="block" rendered="{!AND(displayResults, searchResults.size=0)}"> Sorry, your search returned no results. </apex:outputPanel> </apex:form> </apex:outputPanel></apex:page>