• rickmerole
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am on day one of my Group Edition subscription and am already hitting limits of the implementation.

What I am really trying to do, is to generate vCard files from my address book entries, so I can import them into my Mac address book. Yes, there is a free solution, but it doesn't work well, so I made my own. I'll write about that later (if anyone wants to see it).

Part of my solution is the need for a script that runs on my server, to take an http request and return a downloadable file (which is my vCard). Most fields have no special characters in them, EXCEPT the "Mailing Address" field of the "Contact Detail" page.

This field is auto-generated by salesforce and puts some fields together, including "Mailing Street". The latter may contain line feed characters (when you enter multiple lines of text in there, which is very likely).

The challenge now for me was to extract individual lines from either of these two fields, and that is where the pain began...

First I thought, the function BR() would generate the exact same kind of linefeed that would be stored in the field. Wrong. This means, using the FIND() function will not find line feeds.

However - using the MID() function on the end of line of a "Mailing Street" entry allowed me to extract the invisible character, and in turn to search for it using FIND().

Here is what I did. This is kludgy, but I have no alternative ideas.

In "Company Profile -> Company Information -> Address", I made sure to enter two lines of data. The second line is our suite number, "#150".

Now I created an invisible (i.e. not visible on any page layouts) text field "linefeed". The formula in it is:

MID( $Organization.Street , FIND("#150", $Organization.Street ) - 2, 1)

This extracts the first of the two(!) invisible line feed characters and stores it in the field

Next, I am assuming that an address field will not contain more than three lines, and I created the following fields (for simplicity I am only giving the API names here):

Mailing_Street_1__c = IF(FIND( linefeed__c , MailingStreet ) = 0, MailingStreet, LEFT( MailingStreet , FIND( linefeed__c , MailingStreet )-1))

Mailing_Street_1_len__c = LEN( Mailing_Street_1__c )

Mailing_Street_2__c = IF(Mailing_Street_2_len__c > 0, MID( MailingStreet , Mailing_Street_1_len__c + 3, Mailing_Street_2_len__c ) , "")

Mailing_Street_2_len__c = IF(FIND( linefeed__c , MailingStreet, Mailing_Street_1_len__c + 3) = 0, LEN( MailingStreet ) - Mailing_Street_1_len__c , FIND( linefeed__c , MailingStreet, Mailing_Street_1_len__c + 3) - Mailing_Street_1_len__c - 3)

Mailing_Street_3__c = RIGHT( MailingStreet , Mailing_Street_3_len__c - 4)

Mailing_Street_3_len__c = LEN( MailingStreet ) - Mailing_Street_2_len__c - Mailing_Street_1_len__c


the ...len__c are numerical formulas, the rest text.

Presto - now you have the address in three individual lines...!

We have multi-currency feture enabled.

 


We have several custom objects for documents like sales order, sales quote, ap invoice ,where values  are stored in the local exhange rate.  GBP, EUR, CHF etc. and the corporate currency is set as USD.
 
I need to be able to record an amount (in a new field) in USD
 
Does anyone have a solution to get values for a currency feild in its curporate currency value.

 

I have trieid using convertCurrency in the select statements but it returns the values in user's currency.

 

I want to know, how do we get the values in corporate currency for any  currency field value.

 

Thanks


Hallo.

I am in a pickle. I am using the appexchange program Clicktools and I am sending e-mails to my contacts for them to verify infomation and/or change them.

I am using an e-mail template inside Salesforce. I just take the surveys url fx; http://clicktools.com/survey.php=?b1l3l2asf2 and add merge fields values as such;

http://clicktools.com/survey.php=?b1l3l2asf2&q1={!Contact_firstname} ..........
q1 = question nr 1
 and .... = so on and so on.
 
The thing is some of the characters in my naitive language (Icelandic) are not available through URLs. Special characters such as Æ, Þ, á and Ó seem to dissapear and the value that comes up when the contact press's his link will be correct but all those special characters come up as gibberish box symbols. I was wondering if there are any url encodeing options through those email templates. I know they aren't used every day to send out links with syntex's in them but in ClickTools they have this !urlencode{syntexs} option which allows these special characters to appear valid and I am wondering if salesforce offers a similer thing.

If not, how do you recommend I take care of this problem.

Best regards
Ragnar Fjölnisson
Broadway @ arnol .net
 
 


Message Edited by raggifj on 01-30-2008 03:19 AM
Hi All,

I am creating an scontrol to pass information from 1 object to another.. basically I want to have a "create invoice" button in an account that sends the account name and address to the invoice.. The problem i'm having is that the "billing address" field has 3-4 lines in it, therefore when the scontrol redirects to the URL https://salesforce....{account.name} + .. {account.Billingaddress} it errors as there are multiple lines on the billing address..

Does anyone know how I can send this billing address to the invoice billing address?? I've got team/group edition

Many thanks

Eoin
Dublin
Ireland