• dev_jh
  • NEWBIE
  • 150 Points
  • Member since 2008

  • Chatter
    Feed
  • 6
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 44
    Questions
  • 107
    Replies

Hi,

 

I wanted to copy some Worflow from one SF environment to another using Eclipse. The problem is that I don´t see an option to create an "Email" object manually through the IDE. Is this possible? Thanks,

 

J

Hi all,

 

I have a VF page on Opportunity in which I want to display owner information. If I use the standard Opportunity controller I can do this without a problem:

 

{!Opportunity.Owner.LastName}

 

However, I have created a controller extension since I need to order the OppLineItems in a certain way and do a bit more stuff. Now the above line is failing which kind of makes sense because there is no "Owner" field on an opportunity, only an "OwnerId" field. Howeve if I try:

 

{!Opportunity.OwnerId.LastName}

 

I get an "unknown property 'String.LastName'

 

Any ideas? Thanks,

 

J

Hi all,

 

I have been researching the forum to understand how to get headers and footers in the PDFs generated from Visualforce. According to these posts it is possible:

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=6411

 

http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=3403

 

However, I have been following the instructions but I get no header or footer. I will explain:

 

1 - I created the static resource as suggested. The file contains the following:

 

 

@page { @bottom-left { content: "Page " counter(page) " Customer Report"; } @top-center { content: "PDF Header"; } }

 

 2 - I included this static resource on my Visualforce page. The first lines of code are:

 

 

<apex:page standardController="Opportunity" showHeader="true" renderas="pdf"> <apex:includeScript value="{!$Resource.PDFHeaderFooter}"/> <table border="0" cellspacing="0" cellpadding="0" width="100%" id="table1"> <tr> <td valign="top">

 

 However, I am not getting anything on the header or footer of the PDF. Can you help? Thanks,

 

J

 

 

 

Hi all,

 

We are generating quotes from Salesforce using Visualforce and rendering the page as PDF.

 

We are trying to display discounts only on line items that have a discount using the following code:

 

 

<apex:repeat value="{!Opportunity.OpportunityLineItems}" var="line"> <tr> <td>{!line.PricebookEntry.Product2.ProductCode}</td> <td align="right"><apex:OutputText value="{!ROUND(line.Quantity,0)}"/></td> <td>&nbsp;{!line.Description}</td> <td align="right"><apex:OutputField value="{!line.UnitPrice}"/></td> <td align="right"><apex:OutputField value="{!line.TotalPrice}"/></td> </tr> <apex:outputPanel id="Discounts" rendered="{!IF(AND(ISPICKVAL(Opportunity.Transport_Charges__c, "Producto Level"), line.Discount__c > 0.0), true, false)}"> <tr> <td align="right" colspan="5">Descuento <apex:OutputField value="{!line.Discount__c}"/></td> </tr> </apex:outputPanel> </apex:repeat>

 

 However this is not working properly. I will explain the 2 problems we are facing:

 

  1. Rendered condition - The below formula does not work properly. Even though Transport_Charges__c is a PICKLIST fiel, Visualforce throws up an error when saying it is a text field. If we try to change the expression to Opportunity.Transport_Charges__c == "Product Level" it does not work. Any ideas why?
    IF(AND(ISPICKVAL(Opportunity.Transport_Charges__c, "Producto Level"), line.Discount__c > 0.0), true, false)
  2. Conditional line not displaying correctly - For test purposes, until we solve point 1 above, we have used a condition that always evaluates to true. Now we can see the line speciying the discount level, but the line does not print with the same length as the other lines (see image below). This does not seem to make any sense. Any help much appreciated.
Error Screen Shot

 

I'm doing my first major Apex scripting job to automatically create events based on a quantity # specified in Opportunity Products.  I'm not the best coder around, so please bear with me here :)

 

I'm trying to query PricebookEntry.Product2.Name but am finding that the output via Apex is the name of the field instead of the actual name specified for the related object.  This also happens with ProductCode as well.

 

For example:

 

PricebookEntry.Product.Name                             .....results in "Name"

Trigger.new[0].PricebookEntry.Product2.Name    .....results in "null"

 

I've been able to narrow down a SOQL query with other fields in the table, so I know it is possible.  Here's an example:

 

[select Id,OpportunityId,Quantity,PricebookEntry.Product2.Family from OpportunityLineItem where PricebookEntry.Product2.Family = 'Services' AND Opportunity.Id = :eachNewOpportunityLineItem.OpportunityId]

 

 

What am I missing?  Someone fill in the obvious for me :)

Hi all,

 

We have the following requirement we are trying to fulfill:

 

Our customer is a reseller that has 2 product lists, one with all products without Transport Costs and the same with the Transport Costs.

 

For opportunity gross margin analysis what we would need ideally is the ability to add the cost of the product as a new field in the PriceBookEntry object. Is this possible? We can´t see the option through the admin screens!

 

Thanks,

 

J

Hi all,

 

I am getting a very strange error from Eclipse while trying to deploy Code from Sandbox to Live:

 

!MESSAGE WARN [2009-05-25 13:03:07,690] (DeploymentController.java:deployWork:940) - Deployment FAILED. Got the following deploy messages [10]: (1) filename = classes/TestCreacionCandidatosYAnunciantes.cls, result = SUCCESS, affect = changed, id = 01p200000002YrhAAE, fullname = TestCreacionCandidatosYAnunciantes (2) filename = objects/Account.object, result = SUCCESS, affect = changed, id = 00N20000001t0q6EAA, fullname = Account.ApellidosContacto__c (3) filename = objects/Account.object, result = SUCCESS, affect = changed, id = 00N20000001t0q7EAA, fullname = Account.NombreContacto__c (4) filename = objects/Account.object, result = SUCCESS, affect = changed, id = 00N20000001t0q8EAA, fullname = Account.Repeticiones__c (5) filename = objects/Account.object, result = SUCCESS, affect = none, id = 00N20000000itFrEAI, fullname = Account.Tel_fono_2__c (6) filename = objects/Lead.object, result = SUCCESS, affect = none, id = 00N20000001sz5iEAA, fullname = Lead.Repeticiones__c (7) filename = package.xml, result = SUCCESS, affect = changed, id = null, fullname = package.xml (8) filename = triggers/ComprobacionCandidatos.trigger, result = SUCCESS, affect = changed, id = 01q200000004fJEAAY, fullname = ComprobacionCandidatos (9) filename = triggers/PostInsertCuentas.trigger, result = SUCCESS, affect = changed, id = 01q200000004fJFAAY, fullname = PostInsertCuentas (10) filename = triggers/PreInsertCuentas.trigger, result = SUCCESS, affect = changed, id = 01q200000004fJGAAY, fullname = PreInsertCuentas

 

 As you can see, the log states there has been a problem but then shows 10 lines that all display success. Any ideas how I can find out what the problem is? (ie: a more verbose log?)

 

Just getting started with these, hopefully they will be easy to answer!

 

  1. We have created a Custom Object called Test__c that has a Parent / Child relationship to Accounts. We have used other Visualforce templates in the past for lookup relationships using the following syntax to show the related records: <apex:repeat var="cx" value="{!relatedTo.Test__c}">. However now we are getting a message stating: "Error: Invalid field Test__c for SObject Account", is there a different way to access these type of relationships?
  2. On a simmilar subject. We wouldn´t want all Test__c records returned on that query, but just those that have a certain condition. How do you add conditions here?


Many thanks,

 

J

We are looking for an experienced Salesforce Consultant (Certification a Plus but not a must). The candidate must be local (Madrid / Spain) as this is for a customer facing role. Native Spanish speaker. If you are interested drop me a note and I will provide more details.

 

Full Time or Contractor irrespective.

 

Regards,

 

J

Hi all,

 

We have an org with several hundred workflow alerts that send different emails. We need quite a few of these emails copied to a specific email address.

 

Rather than manually modifying all these through the GUI we thought about connecting with Eclipse to the Production Org and modifying the Workflow XMLs to include on each alert a line:

 

<ccEmails>xxxx@yyyy.com</ccEmails>

 

We have done so successfully for one of the Objects. When we try to proceed with another object it does not seem to work. As soon as we edit the XML with Ultra Edit we get a mark in Eclipse stating the data is dirty. Even if we try to refresh it, it remains dirty. When we deploy, we get an error message (here is the Eclipse Log for it). Can anyone help or suggest another approach? Thanks!!!

 

 

!SESSION 2009-05-01 16:07:45.415 ----------------------------------------------- eclipse.buildId=M20080221-1800 java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY com.salesforce.ide.core 2 0 2009-05-01 16:07:53.234 !MESSAGE WARN [2009-05-01 16:07:53,225] (ProxyManager.java:init:49) - No proxy bundle found - default proxy service will be initialized !ENTRY org.eclipse.osgi 2 0 2009-05-01 16:07:59.676 !MESSAGE While loading class "com.salesforce.ide.upgrade.internal.UpgradeNotifier$3", thread "Thread[main,6,main]" timed out waiting (5000ms) for thread "Thread[Worker-2,5,main]" to finish starting bundle "update@plugins/com.salesforce.ide.upgrade_15.0.0.200902181452.jar [288]". To avoid deadlock, thread "Thread[main,6,main]" is proceeding but "com.salesforce.ide.upgrade.internal.UpgradeNotifier$3" may not be fully initialized. !STACK 0 org.osgi.framework.BundleException: State change in progress for bundle "update@plugins/com.salesforce.ide.upgrade_15.0.0.200902181452.jar" by thread "Worker-2". at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1141) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:258) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addViewListener(UpgradeNotifier.java:300) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addPackagesViewListener(UpgradeNotifier.java:265) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addOpenedViewListeners(UpgradeNotifier.java:243) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.access$0(UpgradeNotifier.java:239) at com.salesforce.ide.upgrade.internal.UpgradeNotifier$1.run(UpgradeNotifier.java:108) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) Caused by: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException ... 42 more Root exception: org.eclipse.osgi.framework.internal.core.AbstractBundle$BundleStatusException at org.eclipse.osgi.framework.internal.core.AbstractBundle.beginStateChange(AbstractBundle.java:1141) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:258) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400) at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addViewListener(UpgradeNotifier.java:300) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addPackagesViewListener(UpgradeNotifier.java:265) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.addOpenedViewListeners(UpgradeNotifier.java:243) at com.salesforce.ide.upgrade.internal.UpgradeNotifier.access$0(UpgradeNotifier.java:239) at com.salesforce.ide.upgrade.internal.UpgradeNotifier$1.run(UpgradeNotifier.java:108) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) !ENTRY com.salesforce.ide.core 2 0 2009-05-01 16:09:56.163 !MESSAGE WARN [2009-05-01 16:09:56,162] (ProjectService.java:handleDeployResult:1892) - Save failed! !ENTRY com.salesforce.ide.core 2 0 2009-05-01 16:09:56.201 !MESSAGE WARN [2009-05-01 16:09:56,200] (ProjectService.java:handleRetrieveResult:2023) - Nothing to save to project - retrieve result is empty

 

 

 

Hi all,

 

We are using Eclipse to deploy changes made on a Sandbox and we are getting a few odd errors. This has made us deploy in batches (and also, having to re-do changes manually in Production, for those changes that just can´t be migrated!).

 

The most annoying thing is that, whenever we want to add objects to an existing Force.com project in Eclipse (like, for example, the Opportunity Standard Object) we get an error message and it doesn´t work. The message states: "Factory Exception occurred when marshalling package manifest into DOM document, please make sure package manifest is well-form and present in proper location. Reason: Invalid byte 2 of 4-byte UTF-8 sequence".

 

The only option we have is to delete the project and recreate but this is incredibly frustrating. Any thoughts?

 

Thanks,

 

J

We have an after update and insert, trigger on Opportunities which fetches a valude from an account field and updates back on opportunity. It works perfectly fine when any opportunity recorde is created or updated from UI. However the trigger is not getting fired when an opportunity record is updated using excel connector.

Can some one please throw some light on this. Thanks. 

Hello Everyone. I am very new to SalesForce development and would like to ask some questions regarding Triggers.

 

My company has a need to capture duplicate leads and process them by merging information.

 

After reading through documentation, I thought trigger would be the best way to do this.

 

To test the process, i created a custom object and wrote "before insert" trigger against it.

This trigger essentially searches for record based on email address and if record exists, it updates the visit count. However, I failed on this matter since after it processes the new record, it STILL inserts the duplicate record.

 

I've tried to use both before insert, after insert events.

My thought was, before insert, merge the record and after insert, delete the newly created record.

This also failed since I can NOT perform DML against trigger.new records.

 

Has anyone faced this type of issue before and if so, how did you resolve this?

 

Any assistance would be greatly appriciated.

 

thank you.