• mjackmetavante
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I followed the instructions to create a report that pulls in the Company Name as a parameter. The report works fine, except for companies that end in ", Inc." or ", LLC", etc.

 

For some reason, the parameter removes the space between the comma and "Inc", so that no results are returned. Any ideas on how to correct this?

 

Thanks.

 

Nathan

  • February 21, 2010
  • Like
  • 0

Is there a way to populate a multiselect pick list via workflow rules.  If it was a text field I would be able to say if record type = x then populate field with y.

 

If not does anyone know an alternative method of accomplishing the same thing.

 

David

I'm trying to write a simple trigger that renames a record. I keep getting the error "CallLineItemRename: execution of BeforeInsert caused by: System.SObjectException: DML statment cannot operate on trigger.new or trigger.old: Trigger.CallLineItemRename: line 18, column 9" . What am I missing here?

 

 

 

trigger CallLineItemRename on Call_Line_Item__c (before insert, before update) { // this triger renames the call line item id to be // the specified inventory item name or the product name List<Call_Line_Item__c> callItems = new List<Call_Line_Item__c>(); callItems = Trigger.new; for (Call_Line_Item__c callItem : callItems) { //check if inventory or product was specified if (callItem.Inventory_Item__c <> NULL) { callItem.Name = callItem.Inventory_Item__r.Name; callItem.Name = 'inv item name'; } else if (callItem.Products__c <> NULL) { callItem.Name = callItem.Products__r.Name; } } update callItems; }

 

 

 

Am trying to configure email-to-case.  I downloaded the latest agent and updated to the current JDK, configured sfdcconfig.txt and email2case.txt as follow:

<configFile>
    <server1>
        <url>secure.email.com</url>
        <protocol>imap</protocol>
        <userName>autoalerts@mydomain.com</userName>
        <password>************</password>
        <interval>10</interval>
        <inbox>Inbox</inbox>
        <readbox>Inbox</readbox>
        <errorbox>Inbox</errorbox>
    </server1>
</configFile>



<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/8.0</url>
        <userName>me@mydomain.com</userName>
        <password>MysfcomPwdMysfcomToken</password>
        <loginRefresh>30</loginRefresh>
        <timeout>600</timeout>
    </sfdcLogin>
    <notify>
        <notifyEmail>
me@mydomain.com</notifyEmail>
        <from>autoalerts@mydomain.com</from>
        <host>secure.email.com</host>
        <port>8025</port>
        <user>autoalerts@mydomain.com</user>
        <password>**********</password>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>\\C:\AdminTools\sfcomemailtocase\</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>file:\\C:\AdminTools\sfcomemailtocase\</largeAttachmentURLPrefix>
        <largeAttachmentSize>0.5</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>C:\\AdminTools\\sfcomemailtocase\\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>



I checked into other similar threads and confirmed I can ping www.salesforce.com.  I've turned off all the firewalls on test network & laptop.  Test laptop is an XP machine.  I'm not knowledgeable about the errors cited below.  Any help would be greatly appreciated.


log contents:
2009-01-03 08:51:40,843 1281 [main] ERROR com.sforce.mail.GenericClient  - Failed to connect to SFDC service
com.sforce.ws.ConnectionException: Failed to send request to https://www.salesforce.com/services/Soap/u/9.0
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:79)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:734)
    at com.sforce.mail.GenericClient.login(GenericClient.java:267)
    at com.sforce.mail.GenericClient.getConnection(GenericClient.java:179)
    at com.sforce.mail.GenericClient.<init>(GenericClient.java:135)
    at com.sforce.mail.ImapClient.<init>(ImapClient.java:40)
    at com.sforce.mail.EmailService.loadService(EmailService.java:153)
    at com.sforce.SalesforceAgent.main(SalesforceAgent.java:138)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:99)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:72)
    ... 7 more

I am getting this error and cant get solution after heavy solution in email2case

Attempting to start service com.sforce.mail.EmailService with configuration file D:\\EmailAgent\\email2case.txt


[main] ERROR com.sforce.mail.GenericClient  - Failed to connect to SFDC service

com.sforce.ws.ConnectionException: Failed to send request to https://www.salesforce.com/services/Soap/u/8.0

    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:79)
    at com.sforce.soap.partner.wsc.PartnerConnection.login(PartnerConnection.java:734)
    at com.sforce.mail.GenericClient.login(GenericClient.java:267)
    at com.sforce.mail.GenericClient.getConnection(GenericClient.java:179)
    at com.sforce.mail.GenericClient.<init>(GenericClient.java:135)
    at com.sforce.mail.ImapClient.<init>(ImapClient.java:40)
    at com.sforce.mail.ImapSSLClient.<init>(ImapSSLClient.java:31)
    at com.sforce.mail.EmailService.loadService(EmailService.java:156)
    at com.sforce.SalesforceAgent.main(SalesforceAgent.java:138)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:99)
    at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:72)

email2case.txt :
<configFile>
    <server1>
        <url>smtp.xyz.com</url>
        <protocol>IMAPS</protocol>
        <userName>abc@xyz.com</userName>
        <password>********</password>
    <port>465</port>
        <interval>10</interval>
        <inbox>Inbox</inbox>
        <readbox>Read</readbox>
        <errorbox>Errors</errorbox>
    </server1>
</configFile>


<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/8.0</url>
        <userName>abc@xyz.com</userName>
        <password>*****************************</password>
        <loginRefresh>1</loginRefresh>
        <timeout>15</timeout>
    </sfdcLogin>
    <notify>
        <notifyEmail>abc@xyz.com</notifyEmail>
        <from>abc@xyz.com</from>
        <host>https://mail.google.com</host>
        <port>993</port>
        <user>narendra.metacube@gmail.com</user>
        <password>********</password>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>D:\\EmailAgent\\</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>D:\\EmailAgent\\</largeAttachmentURLPrefix>
<largeAttachmentSize>5</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>D:\\EmailAgent\\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>

I want to create resource and public calendar events using Apex. The problem I have ran into is inorder to create an event with Apex and then associate with a resource or public calendar requires the id of of the calendar object which would then be used to populate the ownerid field of the event object. It appears resource and public calendars are defined as users in the user table.
These user table records associated with resource and public though are "hidden" though. It does not seem possible to issue queries for them directly to the user table. Does anyone know a means of making the public and resource calendar users accessible in the user table?
Another question is whether it is possible to expose as an entries in a user lookup (reference) field? The calendar entries do not show up by default.
 
Any assistance is greatly appreciated!
  • April 29, 2008
  • Like
  • 0
Maybe I'm missing the obvious here, but I can't figure out how to deactivate a trigger in a production environment. I created a simple trigger in the sandbox, tested and deployed it to production. Everything works fine and the trigger works as expected in production. However now I would like to deactivate and/or undeploy it from production. In the sandbox I can edit the trigger and uncheck the IsActive field, but I can't edit the trigger in production (I am the system administrator) because there is no Edit link.

I tried deactivating in the sandbox and then redeploying to production, but that didn't work either. Do I need to write a deployment script, access the metadata, use Ant? Without the ability to roll back triggers from production, I can't use Apex. What am I missing? I searched all the documentation and this forum and didn't find anything other than references to the UI checkbox, which doesn't exist in production.

Mark

Message Edited by MarkL on 02-21-2008 09:48 AM
Is it possible to add an event to a public calendar via apex or the API in general?  I could try it myself, but it's much quicker to ask.

Once I've added an event to a public calendar via the standard UI, I can pull up the record in Apex Explorer etc. and see that it's put in the public calendar ID as the OwnerID, but don't know if apex will let me write that value directly.  (I've noticed that one quirk of the standard UI is that while I can create an event in the public calendar if I start from that calendar, I can't take an existing event and move it to a public calendar by typing the name of the calendar in the Assigned To field (which I assume corresponds to OwnerID.)   I want to make sure there aren't similar limitations on edits for apex.

And is there any way to pull up a list of public calendars and their ID's?  I don't see the object anywhere in the scema explorer.

Thanks much!

  • November 14, 2007
  • Like
  • 0