• sjain1.2523113033806995E12
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 25
    Replies

I want to write my own account page in VF. 

 

My problem: I cannot show the Object type (Account) and the object's name on top of the page together with the symbol, the standard page has in the upper left corner.

 

Is there a standard function or do I need to mimik the SFDC's behaviour myself? In the latter case: how do I get the symbol or do I need to put a copy into the static resources?

Hi,

      Can we access which email templates use the specific object merge fields like standard objects contact , account. The scenario is i want to retrieve all those email templates which contains contact and account merge fields.Any suggestion would be reallly appreciated.

Hi,

i have applied a scroll for the pageblocktable using a outputpanel but now i want to freeze the header of the pageblock table when i do scroll. Any help would be really appreciated..

 

Hi,

      Can we associated on task with multiple contacts either  salesforce customization or code. Any help would be appreciable.

<apex:outputText value="{0, number,$###,###,###.00}">
              <apex:param value="{!r.InvestMntAmount}"/>
</apex:outputText>


This results gives the output $1,000  but My currency/locale is set to English (United Kingdom) so I was expecting the pound symbol (£), but i have given $ in currency format. how to set the currency with the above code

by organization default currency locale.Any suggestion would be appreciated.

Hi,

      i want to know how to cover the site.createportaluser() method in testmethods. when i run the class which creates customer portal user through this methods.when run the class this method always returns null. Any help would be great appreciable.

string Userid = site.createportaluser(u,accountid,null);

Hi,

      i want to know how to cover the site.createportaluser() method in testmethods. when i run the class which creates customer portal user through this methods.when run the class this method always returns null. Any help would be great appreciable.

string Userid = site.createportaluser(u,accountid,null);

Hi Guys,

                I want to set the Organization Timezone when creating a customer portal users internally.

                User u1 = new User(contactId=con.Id, username=con.Email, firstname=con.FirstName,
                lastname=con.LastName, email=con.Email,communityNickname = con.LastName + '_' + Rnd,
                alias = string.valueof(con.FirstName.substring(0,1) + con.LastName.substring(0,1)), profileid = pf.Id,           emailencodingkey='UTF-8',languagelocalekey='en_US', localesidkey='en_US'); i ahve given a hard coded timezone in User field. How to set the organization timezone here.Any help would be appreciated.

 

Hi guys,

 

when i am sending an email through Messaging.singleEmailMessage(Outbound Email) with attach pdf, unable to view pdf due to improper content type. I am not using the renderAsPdf content which is available in doc(Apex code documentation)

only set the data in attachment body of two textbox data.Anyone help me out to resolve this issues

 

public String subject { get; set; }
public String body { get; set; }
String inputStr = subject + body;
Blob inputdata = Blob.valueOf(inputStr);
Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();
efa.setContentType('application/pdf');
efa.setFileName('attachment.pdf');
efa.setBody(inputdata);

Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
String[] toAddresses = addresses.split(':', 0);
email.setSubject( subject );
email.setToAddresses(toAddresses);
email.setPlainTextBody(Msg);
email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa});
// Sends the email
Messaging.SendEmailResult [] r =
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});

 

 

 

Regards

saurabh

 

I have to create a visual force page to replace the standard page for adding opportunity line items.

 

Please let me know how I can achieve this.

Hi Team,

 

I created one web to lead form and the problem is that after saving data in web form it is successfully saved but it is not saving data in lead object.i dont know where it is saving.

 

Please let me know what is the problem in this and tel me the solution for this.Is there any option is there to check what are all the web to lead form i created?

 

Thanks in advance.

  • July 14, 2011
  • Like
  • 0

I am interested in participating in the July 10 - 14th training in Dev - 501 (at Bangalore,India), for which I filled the web form.

 

While awaiting someone from SFDC to contact, I have  a few curiosities:

1) Does not taking Dev - 401 creates a serious handicap?  In which way this can be overcome?

2) Does experience in OODD helps?

3) Would one be equipped sufficiently in order to take the certification exam immediately after the course?

4) Does being a JavaEE architect help?

 

 

Hi All,

 

I have a VFP which has a button which on clicked opens a new popup having different VFP. To open the popup I have used window.open method of JS.

I want that when I click outside the popup it should get closed. Any thoughts/ideas to it are welcomed.

I want you to know that I have used this function:

 

<script>
window.onblur=function(){
self.close();
}; 
</script>

 

 

Now whenever I click on popup window itself, it gets closed. LOL, this is weird.

Waiting for your replies.

 

Regards,

Lakshman.


Hello,

I'm working with PHP in Wordpress, and I'm trying to generate a web-to-lead using PHP code, but I'm having no luck.  I am able to generate a lead entering the following in my web browser:
https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&lead_source=General&oid=myorgid&idClient=99&first_name=DonDon&last_name=Trump&email=Don%40famousknobs.com&phone=212-853-7999&description=Dufusry

and I am able to generate a lead using an HTML form:
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST">

    <input type=hidden name="lead_source" value="Tier1">
    <input type=hidden name="oid" value="myorgid">

    <input id="first_name" name="first_name" type="text" value="" style="width:95%" />
    <input id="last_name" name="last_name" type="text" value="" style="width:95%" />
    <input id="email" name="email" type="text" value="" style="width:95%" />
    <input id="phone" name="phone" type="text" value="" style="width:95%" />
    <input id="description" name="description" type="text" value="" style="width:95%" />

    <input id="submit"type="submit" value="Do it"></input>

</form>


But when I use curl or fopen or http_post_fields (code below), I get nothing, and no indication of what could be wrong.  Can anyone tell me how to do this, or give me some tips on what to look for?

By the way, submitting directly from the form is not an option because I have to do some processing locally prior to actually submitting the lead.  So right now the HTML form above is actually set up to load a page where that processing occurs and where the lead is sent out.

Thanks!
Dave

function do_post_request($url, $data, $optional_headers = null) {
    $params = array('http' => array(
                'method' => 'POST',
                'content' => $data
                ));
    if ($optional_headers !== null) {
        $params['http']['header'] = $optional_headers;
    }
    $ctx = stream_context_create($params);
    $fp = @fopen($url, 'rb', false, $ctx);
    if (!$fp) {
        throw new Exception("Problem with $url, $php_errormsg");
    }
    $response = @stream_get_contents($fp);
    if ($response === false) {
        throw new Exception("Problem reading data from $url, $php_errormsg");
    }
    return $response;
}

$url = 'https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8';

//url-ify the data for the POST
foreach ($_POST as $key=>$value) {
    $postvalues[$key] = $value;
    $postFieldsString .= $key.'='.urlencode($value).'&';
}
rtrim($postFieldsString,'&');

//open connection
$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POST, count($postvalues));
curl_setopt($ch,CURLOPT_POSTFIELDS,$postvalues);

//execute post using curl
$resultOfPost = curl_exec($ch);

//close connection
curl_close($ch);

//execute post using fopen
$dingoAteMyBaby = do_post_request($url, $postvalues);

//execute post using http_post_fields
$lordHaveMercy = http_post_fields("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&", $postvalues);

Hi all!

 

I have a strange and annoying problem with my Force.com site. There is a start page where a user can press a button and pass to another page. From time to time after pressing the button the page refreshes about 1 or 2 minutes and then Authorization Required Page appears. There is no errors in the method for this button because all code is enclosed in try/catch block, so user must see a message if an exceptions is thrown. Of course I try this in debug mode. The problem is this issue is unpredictable and takes place not very often so it's hard to reproduce it. But one time I managed to do this and didn't see any additional messages in Authorization Required Page. May be someone has an idea how to find out what's wrong? I don't know what to do if I don't have any error messages to clarify the situation. Any help will be appreciated.

  • May 26, 2011
  • Like
  • 0

Hi,

Salesforce.com Site is giving error in Internet exploer and Chorme browser with SSL Certificate issue when we tried to login but it works in Mozilla browser. Please help me this issue, since we are reaching the deadline of my developement.

Thanks,

Ravikumar Katragunta

  • May 17, 2011
  • Like
  • 0

Hi

 

I'm trying to get the HTML code of a chart and assigning it to an atribute of the controller.

 

<apex:inputText value="{!chartHTML}" id="chartHtmlInput" style="display:none;"  />

 

I've got the atribute chartHTML specified in the controller and I'm trying to asign to it the HTML code of a chart.

 

so I use the following javscript code

 

document.getElementById('{!$Component.chartHtmlInput}').value= document.getElementById('{!$Component.chartPanel}').innerHTML;

 

sadly the HTML code I'm getting is escaped, as you know I can't use the attribute "escape" in <apex:inputText>

 

any Ideas how can I get my code non-escaped?

 

Thanks in advance

  • May 16, 2011
  • Like
  • 0

I have created a custom web form to enter information into a custom object. Everything works great except for the submit button. We recently had someone enter two identical records almost immediately so I went into our sandbox to test my theory and, unfortunately, I was correct...if you click the submit button multiple times before the page processes and redirects to the thank you page it will generate multiple identical records based on the number of times the button was clicked. Is there anything that can be done to ignore the multiple clicks and process only one record instead of duplicating it?

 

 

Thanks!!

I want to write my own account page in VF. 

 

My problem: I cannot show the Object type (Account) and the object's name on top of the page together with the symbol, the standard page has in the upper left corner.

 

Is there a standard function or do I need to mimik the SFDC's behaviour myself? In the latter case: how do I get the symbol or do I need to put a copy into the static resources?

Hello,

 

i have created with a Formula Field an GoogleMaps Hyperlink:

 

Code: HYPERLINK("http://maps.google.com?q=" & Street1__c & "%20" & CityName__c & "%20" & State & "%20" & PostalCode__c & "%20" & Country__c , IMAGE("/servlet/servlet.FileDownload?file=01530000001hbwB", "Google Map"))

 

The Problem is that, if there is no Adress information the Outputfield will show me an Link:

 

<a href="http://maps.google.com?q=%20%20%20%20" target="_blank"><img src="/servlet/servlet.FileDownload?file=01530000001hbwB" alt="Google Map" border="0"/></a>

 

I would like to show me nothing if there is no Adress Information and if there is any Adress Information i would like to show me the GooleMaps Info.

 

I hope anyone can help me please:)

 

Txs.

 

Cheers

Hi,

 

I have created 5 VisualForce pages and an apex class in order to have some form for quote request. These quote request add a new account and a new opportunity related, and they work fine until I stay on salesforce and access to them with a link like ***.salesforce.com/apex/mypagevf.

But I want these pages on a SalesForce Sites (which I created) and I have two problems with that:

 

1 ) All my custom fields (of account and opportunity) which I use with <apex:inputfield> don’t display on the page when I access to my domain name… Maybe I have to change the security of these fields but they already are “Changeable”.  How to access these fields on the domain name?

 

2) When I click on my button submit, the salesforce sites tell me that an authorization is required and i have to login… But I want a site where my partners can request a quote directly without connection or anything else!

 

Thanks