• m_roark
  • NEWBIE
  • 75 Points
  • Member since 2006

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 41
    Replies

                 In our scenario,i need to create set of random events for contacts ,we tried with trigger  ,

that create only one event   for an instance.

                 how do we create bulk events?  

             Anybody have solution or valuable suggestion for this query would greatly appreciated  !

 

            Thanks in advance!

I'm building a custom wizard for new Opportunities which will also build an initial Quote.  I'm trying to figure out how to leverage the platform's native ability to create Quote Line Items from the parent Opportunity, and I'm a bit stumped. Creating a new Quote doesn't seem to do it automatically. 

 

I looked through the usual resources, the Apex language reference and the Web Services reference, and I am unable to find any documentation on what methods are available on the Quotes object.  Code completion isn't working for me in Eclipse on the Quote object, so that doesn't work either.

 

I've searched this site, and even turned to Google.  Unfortunately 'quote' is a very generic search term, so it hasn't been very helpful.   If anyone can point me to a good resource primer on the Quote object as it exists in Apex, I would be most appreciative.

I have some older triggers generated in my production environment using old versions of the APEX which I want to update to the most recent versions in order to gain access to updated methods and functionality.  I currently use the Force.com IDE for Eclipse to develop all of my triggers and classes.

 

I tried updating the version in the'*.trigger-meta.xml' file.  However, when I attempt to save the updated file, I receive this error message: 'Save error: Unable to perform save on all files: An unexpected error has occurred. Please try again, or check the log file for details.'

 

 

Short of deleting this trigger and recreating it, how can I update the API version of the trigger?

http://forums.sforce.com/sforce/board/message?message.uid=168908#U168908

 

I marked this as solved because it stopped happening for my user.  However, they report (and I have confirmed) that this issue is happening again. 

 

The only changes we made today in SalesForce were to add a new profile for a completely different user.  No changes have been made to the server where the i-frames are pointing.

 

The really weird thing is, that when I am accessing this user's account via Login Access, I cannot replicate this issue.   This could point to an issue with access to the sites linked in the i-frames, but the user can access these sites normally via directly linking to them in the main browser window.

 

Any assistance would be appreciated.

I have a problem with an embedded VisualForce page that has only started occurring since the Spring '10 upgrade.

 

Here is the page.

 

 

<apex:page standardController="Account"> <apex:iframe src="http://<<<URL OBSCURED>>>>/Default.aspx?docs=false&id={!Account.Id}&sid={!$Api.Session_ID}&url={!$Api.Enterprise_Server_URL_140}" rendered="{!ISBLANK(Account.Sharepoint_URL__c)}"/> <apex:iframe src="{!Account.Sharepoint_URL__c}" rendered="{!NOT(ISBLANK(Account.Sharepoint_URL__c))}"/> </apex:page>

 

The 'Account.Sharepoint_URL__c' is a text field with a URL to a Sharepoint site.  If this value is not populated, I direct users to an ASPX page which will generate a Sharepoint site based on a template and will populate the 'Sharepoint URL' field for the appropriate Account record.  The users are then redirected to the Sharepoint site. 

 

This VisualForce page was working without issue last week for all  users.  Now, whenever a user who is not a part of our 'System Administrator' profile accesses this page, they get an 'Insufficient Privileges' error. The users using this page have the 'View Setup and Configuration' permission.

 

I have verified that all profiles are granted access to the VisualForce page in the 'Security' for the page.  I have tried removing access, and re-granting it.  I have verified that  both the Sharepoint site and the ASPX page are accessible for this user outside of the frame.  I have verified that the field 'Account.Sharepoint_URL__c' is accessible to the user's profile.

 

As near as I can tell, this should work without issue.  In fact, when I or any other SalesForce System Administrator try to access this page, it does work without issue.

 

What has changed, or what permissions am I not checking which would cause this error?

 

All,

 

I have had a request from a user, and I am struggling with how to accomodate it. 

 

My user works with Leads, and is frustrated that the address information input for the Leads is not transferred to the new Contact created when the Lead is converted.  I have looked into the standard functionality, and have found that this information is instead transferred to the Account which is created.  I can create a new set of custom fields for both the Lead and Contact records to transfer this information, but I don't feel this adequately meets my users' needs.

 

Instead, I am trying to determine if I can update the Contact information as it is being created by the 'Convert Lead' process, using an APEX trigger.  Unfortunately, I can find little information about how triggers relate to the 'Convert Lead' process.  I have looked at the discussion boards, blogs, and developer's guide, but cannot seem to find the information I need. 

 

I am aware that I may need to request that the 'Enforce Validation and Triggers from Lead Convert' functionality be enabled in my org, and that this will allow me to use the 'before create' trigger setting to create a trigger on the Contact object which will allow me to update the fields in the Contact record before it is saved.  However, how do I access the original Lead in the trigger to allow me to grab the address information stored in the Lead?

 

Any help would be greatly appreciated.

Message Edited by m_roark on 03-10-2009 03:03 PM

Is there a way to do this?

 

I have several VisualForce pages I am using the generate PDF documents.  I find that I cannot seem to control simple layout and style items, such as the format for table headers and the type of font used for the document, using in-line CSS when these pages render as PDFs.  I am easily able to control these elements using in-line CSS when I render these pages as HTML.

 

This is important as several VisualForce elements do not let me define style attributes for an element. I have to use in-line CSS classes to pass to the element's appropriate 'style' attribute.  An example of this is the 'apex: DataTable'element, which requires I pass it a CSS class to the 'headerClass' and 'rowClasses' attributes.

 

However, it is as if the PDF rendering engine is ignoring my in-line CSS.  Is there any way to force the PDF engine to use my CSS, so I can get a PDF output which matches my HTML output?

Message Edited by m_roark on 02-20-2009 09:14 AM
The subject basically says it all.  Is there a way to do this?  I need to display the elements in my table in a specific sort order.
I am attempting to create a VisualForce page which looks like the standard 'Send an Email' page.  To this page, I want  to add an extension which will automatically attach a document when the 'Send' button is clicked.

I can create a page which uses the 'EmailMessage' standard controller, but I cannot determine which component I must use to get the standard 'Send an email' page to load.  I have tried using the '<apex:detail>' component to no avail.

Is there a way to do this?  And if so, what elements should I be using to do this?  Further, is there any documentation prepared, or planned outlining what each of the standard controllers are, and what basic functionality is available for each?

I know that I could probably add a trigger to do what I want, but as I only want this to happen on a specific page I don't want to have to try to code the trigger to prevent the attachment from being attached to every outgoing email.

For those who are wondering, my business case is that I have a VisualForce page which generates an Invoice for our customers.  I want to provide a link to our end users on this page, which directs the user to a VisualForce page which looks like the 'Send an email' page.  On this new page, they can use the standard email functionality to write an email to a contact at the client site (including adding any templates they would like).  When they click 'Send', I want to attach a copy of the Invoice, generated as a pdf.

Any help would be appreciated.


Message Edited by m_roark on 12-02-2008 01:37 PM
In the Apex Language reference, on page 168, in  'Table 52: Actions and trigger events', there is a column called 'Can update original object using an update DML operation'.  How does one do this?  I have looked through the entire language reference, and am unable to find out how this is done.
I am having trouble with updating a record which triggered an 'after undelete' trigger in the trigger iteself, and need assistance with attempting to isolate why I am encountering an error message.

I am working on an Inventory control application, used for placing orders for and managing our marketing materials.

The trigger in question is fired when a 'Request Item' (an object used to track a single item order in our 'shopping cart') is undeleted.  In this case, if the user is undeleting a record which has a 'Quantity ordered' value greater than the amount of inventory currently available in the related 'Inventory' record, I want to undelete the record, but move it to a 'Backordered' status.

The trouble is, I can't seem to get at the 'Request Item' record which is being undeleted.  I need to get to it to update the status value.  I have tried three different methods; all are below.  The code generating the error messages (which are below the code) is highlighted.



First method:

else if (Trigger.IsUndelete)
        {
            Request_Item__c newRequestItem = Trigger.new[requestItem];
            String inventoryId = newRequestItem.Inventory__c;
            Inventory__c currentInventory = [Select Quantity_backordered__c, Quantity_on_order__c, Quantity_in_stock__c, Quantity_available__c, Last_order_date__c from Inventory__c where Id = :inventoryId][0];
            
            if (newRequestItem.Status__c == 'Backordered')
            {
                currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
            }
            else
            {
                if (currentInventory.Quantity_available__c < newRequestItem.Quantity_ordered__c)
                {
                    currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
                    newRequestItem.Status__c = 'Backordered';
                }
                else
                {
                    currentInventory.Quantity_available__c -= newRequestItem.Quantity_ordered__c;
                }
            }
            update currentInventory;
        }

Second method:

else if (Trigger.IsUndelete)
        {
            Request_Item__c newRequestItem = Trigger.new[requestItem];
            String inventoryId = newRequestItem.Inventory__c;
            Inventory__c currentInventory = [Select Quantity_backordered__c, Quantity_on_order__c, Quantity_in_stock__c, Quantity_available__c, Last_order_date__c from Inventory__c where Id = :inventoryId][0];
            
            if (newRequestItem.Status__c == 'Backordered')
            {
                currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
            }
            else
            {
                if (currentInventory.Quantity_available__c < newRequestItem.Quantity_ordered__c)
                {
                    currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
                    newRequestItem.Status__c = 'Backordered';
                    update newRequestItem;

                }
                else
                {
                    currentInventory.Quantity_available__c -= newRequestItem.Quantity_ordered__c;
                }
            }
            update currentInventory;
        }


Third method:

else if (Trigger.IsUndelete)
        {
            Request_Item__c newRequestItem = Trigger.new[requestItem];
            String inventoryId = newRequestItem.Inventory__c;
            Inventory__c currentInventory = [Select Quantity_backordered__c, Quantity_on_order__c, Quantity_in_stock__c, Quantity_available__c, Last_order_date__c from Inventory__c where Id = :inventoryId][0];
            
            if (newRequestItem.Status__c == 'Backordered')
            {
                currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
            }
            else
            {
                if (currentInventory.Quantity_available__c < newRequestItem.Quantity_ordered__c)
                {
                    currentInventory.Quantity_backordered__c += newRequestItem.Quantity_ordered__c;    
                    Request_Item__c updateRequestItem = [Select Id, Status__c from Request_Item__c where Id = :newRequestItem.Id];
                    updateRequestItem.Status__c = 'Backordered';
                    update updateRequestItem;

                }
                else
                {
                    currentInventory.Quantity_available__c -= newRequestItem.Quantity_ordered__c;
                }
            }
            update currentInventory;
        }


In the first case, I get the following error message:

Apex script unhandled trigger exception by user/organization: [value removed]/[value removed]

checkInventory: execution of AfterUndelete

caused by: System.Exception: Record is read-only

Trigger.checkInventory: line 228, column 21



In the second and third cases, I get the following error message:

Apex script unhandled trigger exception by user/organization: [value removed]/[value removed]

checkInventory: execution of AfterUndelete

caused by: System.NullPointerException: Attempt to de-reference a null object

Trigger.checkInventory: line 228, column 21



According to 'Table 52: Actions and trigger events' on page169 of the APEX language reference, I should be able to 'update original object using an update DML operation' during an 'after undelete' call.

My question is how I can do this if the methods outlined above are failing.  Is this functionality which will be coming in Winter '08?

Message Edited by m_roark on 10-26-2007 03:49 PM

Message Edited by m_roark on 10-26-2007 03:50 PM

*Edited the message to make it more readable*

Message Edited by m_roark on 10-26-2007 04:20 PM

I was working on uploading some APEX code in our production environment, using the APEX Deployment Tool add-on for Apache Ant.  I downloaded the most recent version of this tool this morning, as I understand there were some issues with it over the last day or so.

Before I uploaded the code, I had wanted to delete a class created the other day, which had no triggers depending upon it.  However, I received the following error message when I attempted to do so.

BUILD FAILED
C:\Documents and Settings\RoarkM\Desktop\Apache Ant Files\build.xml:16: Failed:
Failed to delete class compileAndTest: Cannot complete this operation. Cannot delete classes/triggers in production.  Use compileAndTest verb to delete. : null

I have included the 'build.xml' file for this build below for anyone who would like to review it.

After realizing that I could not delete this class, I looked to find if there was a way of deactivating APEX triggers or classes in our production environment, as might be necessary if code were to become depreciated.  I could find no documented way through the UI or through the APEX Deployment Tools add-on to do this.

Are there plans to add this functionality, or an undocumented way to deactivate classes?  Has anyone else encountered issues deleting APEX code in production?  Did I misconfigure one of the elements below?

Any assistance would be greatly appreciated.


<project name="Sample usage of Salesforce Ant tasks" basedir="." xmlns:sf="antlib:com.salesforce">
  <property file="build.properties" />
  <property environment="env" />
- <!--
 Deploy to server 
  --> 
- <target name="deploy">
- <sf:compileAndTest username="${sf.username}" password="${sf.password}" server="${sf.serverurl}" apiversion="10.0" baseDir=".">
- <runTests>
  <class>compileAndTest</class>
  </runTests>
  </sf:compileAndTest>
  </target>
- <!--
 Cleans up above. (Deletes can be combined with compiles.) 
  -->
- <target name="delete">
- <sf:compileAndTest username="${sf.username}" password="${sf.password}" server="${sf.serverurl}" apiversion="10.0">
  <deleteClass>compileAndTest</deleteClass>
  <deleteTrigger>addTasksOnComplete</deleteTrigger>
  <deleteTrigger>reassignChildItems</deleteTrigger>
  </sf:compileAndTest>
  </target>
  </project>

I installed Eclipse and the SalesForce plug-in earlier this year and now use it as my primary environment for creating S-Controls.  Now that the APEX Code is live in our production environment, I would like to use this platform for creating custom APEX code.  I have the most recent version of this tool available (8.0.2002), and the page which demonstrates the Apex Toolkit indicates that this should be possible.

However, I find that I cannot create any custom APEX code modules.  After selecting 'Apex Trigger' or 'Apex Package' in the 'New' dialog, I recieve this message: 'Sorry, Apex Triggers are not enabled for you.'

I looked at my configuration for the APEX projects I have enabled, and they are set to a SOAP endpoint of 'https://<instance>.salesforce.com/services/Soap/u/8.0'.  I have tried changing this to a SOAP endpoint of 'https://<instance>.salesforce.com/services/Soap/u/10.0', but then encounter the following error message:

"Unexpected element. Parser was expecting element 'urn: partner.soap.sforce
.com: passwordExpired' but found 'urn: partner.soap.sforce.com:metadataServerUrl'"

Has anyone else encountered this issue?  If so, have you found a workaround I can use to enable this functionality?
I'm in the process of writing a recruiting portal which sits on top of the 'Recruiting Manager' application.  I would like to allow  users to upload a resume, and to that end have included a  'File' HTML input, which allows users to post a file to my code-behind page.  I would like to add this file as an Attachment to the 'Candidate' object.

I am able to create the Attachment record, and relate it to the Candidate object.  However, when I then try to download the file from SalesForce, it comes back as junk data.  I have isolated this to the need to convert the body from the byte[] returned by the HTML Input to a base64 byte[], for use by the Web Service API.

However, the only example I can find of how to do this on the boards, or in any SalesForce documentation, uses Visual Basic, and shows the developer using the 'Redim' method to resize the elements in the byte[] to Int64 before populating the array.

As I am developing in C#, I was wondering if anyone has a suggestion on how to do something similar in C#.  I have seen a few posts recommending downloading and installing custom components, but I am hosting my code on an external box, on which I have no control to add components.  I have tried using various methods for the Convert class, but none seem to be working.

Any ideas?
Will Apex allow for custom Apex code libraries to be imported for use in an Apex application, and will there be an avenue for us to share these with the community?

For example, my organization produces software, and I have an application in mind which would generate a product key for our software when a new Product record of the appropriate record type is created.  To create these keys, we would want to use an encryption algorithm, such as MD5.

I should, potentially, be able to generate a method using the currently published Apex specification which will generate an MD5 hash from a string.  After generating this code, I would want to reuse it, share it across my organization, and possibly share it with or sell it to other organizations (if for example I went one step further and generated a broad spectrun Apex cryptographic library, similar to the System.Security.Cryptography class library in .NET).  Instead of copying and pasting this method into every project I wish to use it in, I would love to be able to include the project this code is in, and reuse this method, using a few lines of code.  Instead of sharing my source code with the community, I could produce a package which could  then be sold using the AppExchange.

I'm building a custom wizard for new Opportunities which will also build an initial Quote.  I'm trying to figure out how to leverage the platform's native ability to create Quote Line Items from the parent Opportunity, and I'm a bit stumped. Creating a new Quote doesn't seem to do it automatically. 

 

I looked through the usual resources, the Apex language reference and the Web Services reference, and I am unable to find any documentation on what methods are available on the Quotes object.  Code completion isn't working for me in Eclipse on the Quote object, so that doesn't work either.

 

I've searched this site, and even turned to Google.  Unfortunately 'quote' is a very generic search term, so it hasn't been very helpful.   If anyone can point me to a good resource primer on the Quote object as it exists in Apex, I would be most appreciative.

I need to remove Edit | Delete Link from the Case Object's list view page (One that you get after selecting a view from dropdown on Case Tab page ). I tried to use <apex:listview>  or  <apex:enhancedlist> to create new list view but I don't get options to remove the ACtion Colums that has liks for Edit | Delete  for each records on the list. So, I decided to design the whole page using Pageblock table and iterating the case records using recordSetVar =" "  attribute. My problem is I Can't understand how to proceed to implement the logic for Accept button. --- It changes the Case Owner from currnt queue to the current user..when user clicks it after selecting few cases. I think I am doing something wrong with the code. It is just refreshing the case. Not doing anything.

 

Can anyone please help me on this?..If this not the right way, then can someone suggest how to proceed...??

 

<apex:page standardController="Case" recordSetVar="cases" extensions="CustomCaseListController" tabStyle="Case_List_View_Tab__tab" > 

    <apex:outputPanel id="keywordheaderPanel" layout="block" style="border: solid 0px red; width: 100%; margin: 0px; text-align: left; height:40px;">
            <apex:sectionHeader subtitle="Cases"  />
      </apex:outputPanel>
    <apex:pageBlock > 
        <apex:form id="theForm">
            
            <apex:panelGrid columns="4" >
                <apex:outputLabel value="View:"/>
                <apex:selectList value="{!filterId}" size="1">
                    <apex:actionSupport event="onchange" rerender="list"/>
                    <apex:selectOptions value="{!listviewoptions}"/>
                </apex:selectList>
                
                <apex:commandButton value="Accept" title="Accept" action="{!acceptCase}" />  <!-- This is the button in question --> 
                <apex:commandButton value="New Case" action="/setup/ui/recordtypeselect.jsp?ent=Case&retURL=%2F500%2Fo&save_new_url=%2F500%2Fe%3FretURL%3D%252F500%252Fo" />
            </apex:panelGrid>
            
            <apex:pageBlockSection title="Cases" id="list2" columns="1" collapsible="false">
                <apex:pageBlockTable value="{!cases}" var="c" id="list" rules="col">
                
                    <apex:column headerValue="Action"> 
                    <apex:selectCheckboxes id="chkboxid">
                        </apex:selectCheckboxes>
                    </apex:column>
                    
                    <apex:column id="caseId" headerValue="Case Number" >
                        <apex:commandLink action="/{!c.Id}" value="{!c.CaseNumber}" /> 
                        <apex:param assignTo="{!caseId}" value="{!c.Id}" />
                    </apex:column>
                    
                    <apex:column headerValue="Case Subject" > 
                        <apex:commandLink value="{!c.Subject}" /> 
                    </apex:column>

                    <apex:column value="{!c.CreatedById}" />
                    <apex:column value="{!c.Priority}" />
                    <apex:column value="{!c.Status}" />
                    <apex:column value="{!c.Contact.Name}" />
                    <apex:column value="{!c.Account.Name}" />
                    <apex:column value="{!c.CreatedDate}" />
                
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:form>
    </apex:pageBlock>
</apex:page>

 

public with sharing class CustomCaseListController {
    public ApexPages.standardcontroller Controller {get;set;}
    Public String caseId {get; set;}
    public ApexPages.standardSetController setcOntroller{get;set;}
    
    //List<Case> caseId = new List<Case>();
    public Case c { get; set; }
    
    public CustomCaseListController(ApexPages.StandardSetController controller) {
        this.setcOntroller = controller;
    }
    
    public CustomCaseListController(ApexPages.StandardController stdController) {        
        // constructor        
        Controller = stdController;        
        this.c = (Case)stdController.getRecord();    
        }
    
    
     public PageReference acceptCase() { 
         //Can't understand what to write there???  
         system.debug('selected values: ' +setcOntroller.getSelected());
         return null;
     } 
    
}

 

  • May 15, 2010
  • Like
  • 0

Hi, I was wondering how to pass a variable to soql. I am trying to make a vf page that has three parameters and a button. I want to enter in the values and then hit the submit button. This would then search through my object for the three parameters and if there is a match display that person's data. For example, John doe, 1/12/2009, 1/20/2010. (These are the parameters). Thanks for any help you can give.

                 In our scenario,i need to create set of random events for contacts ,we tried with trigger  ,

that create only one event   for an instance.

                 how do we create bulk events?  

             Anybody have solution or valuable suggestion for this query would greatly appreciated  !

 

            Thanks in advance!

Good day to those reading this.  I am an administrator by design with very little code experience.  Recently, we lost our developer and I am now responsible for taking this challenge on......okay, I will pause here and allow those playing the violin to finish.  :)

 

I am wanting to create a trigger, based off the information below:

 

When an Opportunity is created, it creates/converts to Stage=Intake. 

 

At this point, we wait for one of our Associates to schedule an Appointment for this Opportunity.  Appointment is a custom object (Appointment__c). 

 

The trigger I am needing assistance with is:

 

Opportunity stage=Intake and Opportunity field Initial_Appointment_Date__c is NULL. 

 

When a first appointment record is created and seen associated to the opportunity where the criteria above is true, then populate Initial_Appointment_Date__c with the date that first Appointment record was added and change the Opportunity stage to Scheduled.

 

Can anyone be so kind as to help me with this trigger?  Thank you in advance....

 

Robert

I have some older triggers generated in my production environment using old versions of the APEX which I want to update to the most recent versions in order to gain access to updated methods and functionality.  I currently use the Force.com IDE for Eclipse to develop all of my triggers and classes.

 

I tried updating the version in the'*.trigger-meta.xml' file.  However, when I attempt to save the updated file, I receive this error message: 'Save error: Unable to perform save on all files: An unexpected error has occurred. Please try again, or check the log file for details.'

 

 

Short of deleting this trigger and recreating it, how can I update the API version of the trigger?

http://forums.sforce.com/sforce/board/message?message.uid=168908#U168908

 

I marked this as solved because it stopped happening for my user.  However, they report (and I have confirmed) that this issue is happening again. 

 

The only changes we made today in SalesForce were to add a new profile for a completely different user.  No changes have been made to the server where the i-frames are pointing.

 

The really weird thing is, that when I am accessing this user's account via Login Access, I cannot replicate this issue.   This could point to an issue with access to the sites linked in the i-frames, but the user can access these sites normally via directly linking to them in the main browser window.

 

Any assistance would be appreciated.

I have a problem with an embedded VisualForce page that has only started occurring since the Spring '10 upgrade.

 

Here is the page.

 

 

<apex:page standardController="Account"> <apex:iframe src="http://<<<URL OBSCURED>>>>/Default.aspx?docs=false&id={!Account.Id}&sid={!$Api.Session_ID}&url={!$Api.Enterprise_Server_URL_140}" rendered="{!ISBLANK(Account.Sharepoint_URL__c)}"/> <apex:iframe src="{!Account.Sharepoint_URL__c}" rendered="{!NOT(ISBLANK(Account.Sharepoint_URL__c))}"/> </apex:page>

 

The 'Account.Sharepoint_URL__c' is a text field with a URL to a Sharepoint site.  If this value is not populated, I direct users to an ASPX page which will generate a Sharepoint site based on a template and will populate the 'Sharepoint URL' field for the appropriate Account record.  The users are then redirected to the Sharepoint site. 

 

This VisualForce page was working without issue last week for all  users.  Now, whenever a user who is not a part of our 'System Administrator' profile accesses this page, they get an 'Insufficient Privileges' error. The users using this page have the 'View Setup and Configuration' permission.

 

I have verified that all profiles are granted access to the VisualForce page in the 'Security' for the page.  I have tried removing access, and re-granting it.  I have verified that  both the Sharepoint site and the ASPX page are accessible for this user outside of the frame.  I have verified that the field 'Account.Sharepoint_URL__c' is accessible to the user's profile.

 

As near as I can tell, this should work without issue.  In fact, when I or any other SalesForce System Administrator try to access this page, it does work without issue.

 

What has changed, or what permissions am I not checking which would cause this error?

 

Quick query - I have 80% code coverage on my apex class yet my overall coverage is 70% as it is including my test method....do I need unit tests for my test methods ?

I'm developing a VF page with a custom controller. I should be able to click the System Log link at the top of the page, see the System Log window appear, go back to my VF page, reload it, and then see a new Log appear in the System Log window, right?

 

The problem is that I don't see a new Log appear in the System Log window.

 

I've tried setting the Filter Settings to the lowest level possible (e.g., Finest), to no avail.  I've tried with the default Filter Settings. Nothing shows up in the "Logs recorded since..." list.

 

If I enter some Apex into the Execute Apex area and execute it, a log does show up in the list. But there doesn't seem to be anything I can do in my VF page that causes a log to be captured.

 

The only way I can get my VF page to display anything in the System Log window is if I turn on System / Monitoring / Debug Logs. But that's only good for 20 logs -- after that, I have to go back to System / Monitoring / Debug Logs and turn it back on again.  It's really unwieldy to have to do that when I'm trying to debug a VF page.

 

Before the new System Log feature, I could monitor what my VF page/controller was doing by just watching the System Log window. Now I have to repeatedly turn on Debug Logs -- is that really true? If so, is there any plan to correct that?

Message Edited by JeriMorris on 01-29-2010 12:48 PM

I have a trigger using a variable that is the value of an equation that I need to get the absolute value of.  I can't seem to get the code to compile.  Here's the error I get and my code:

 

Error: Compile Error: Method does not exist or incorrect signature: ABS(Double) at line 32 column 32

 

 

Decimal DiscountDiff1 = null; Decimal DiscountDiff2 = null; Opportunity O = [select Id, Discount_Rollup__c, Max_Discount__c, Discount_Approved__c, SA_Discount__c, Account.Strategic_Account_Designation__c from Opportunity where Id = :OLI.OpportunityId LIMIT 1]; DiscountDiff1 = ABS (OLI.Discount__c - O.SA_Discount__c); DiscountDiff2 = ABS (O.SA_Discount__c - OLI.Discount__c);

 

OLI.Discount__c  & O.SA_Discount__c are both decimal (percent) fields.

 

 

 

Any help would be appreciated!

All,

 

I have had a request from a user, and I am struggling with how to accomodate it. 

 

My user works with Leads, and is frustrated that the address information input for the Leads is not transferred to the new Contact created when the Lead is converted.  I have looked into the standard functionality, and have found that this information is instead transferred to the Account which is created.  I can create a new set of custom fields for both the Lead and Contact records to transfer this information, but I don't feel this adequately meets my users' needs.

 

Instead, I am trying to determine if I can update the Contact information as it is being created by the 'Convert Lead' process, using an APEX trigger.  Unfortunately, I can find little information about how triggers relate to the 'Convert Lead' process.  I have looked at the discussion boards, blogs, and developer's guide, but cannot seem to find the information I need. 

 

I am aware that I may need to request that the 'Enforce Validation and Triggers from Lead Convert' functionality be enabled in my org, and that this will allow me to use the 'before create' trigger setting to create a trigger on the Contact object which will allow me to update the fields in the Contact record before it is saved.  However, how do I access the original Lead in the trigger to allow me to grab the address information stored in the Lead?

 

Any help would be greatly appreciated.

Message Edited by m_roark on 03-10-2009 03:03 PM
I am attempting to create a VisualForce page which looks like the standard 'Send an Email' page.  To this page, I want  to add an extension which will automatically attach a document when the 'Send' button is clicked.

I can create a page which uses the 'EmailMessage' standard controller, but I cannot determine which component I must use to get the standard 'Send an email' page to load.  I have tried using the '<apex:detail>' component to no avail.

Is there a way to do this?  And if so, what elements should I be using to do this?  Further, is there any documentation prepared, or planned outlining what each of the standard controllers are, and what basic functionality is available for each?

I know that I could probably add a trigger to do what I want, but as I only want this to happen on a specific page I don't want to have to try to code the trigger to prevent the attachment from being attached to every outgoing email.

For those who are wondering, my business case is that I have a VisualForce page which generates an Invoice for our customers.  I want to provide a link to our end users on this page, which directs the user to a VisualForce page which looks like the 'Send an email' page.  On this new page, they can use the standard email functionality to write an email to a contact at the client site (including adding any templates they would like).  When they click 'Send', I want to attach a copy of the Invoice, generated as a pdf.

Any help would be appreciated.


Message Edited by m_roark on 12-02-2008 01:37 PM