• dj_saaspoint
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies

Hi,

 

We are using Ruby 1.9.2 and Rails 3.0.5 to create a Heroku app that connects with Salesforce. While we prefer to use Omniauth and databasedotcom to do most of the work, we couldnt reset user password using them. Now we are trying with Soap 4r - using WSDL created from API 23.  We are able to reset user pasword but we are not able to get the automatic emailing. We have tried instantiating EmailHeader.  What are we missing?

Part of the code looks like this

 

.

.

.

d = Soap.new

l = d.login(:username => user, :password => passwd)

d.endpoint_url = l.result.serverUrl         #

h.sessionid = l.result.sessionId              

d.headerhandler << h  

em = EmailHeader.new  true, false, true  

newpassword = d.resetPassword(userId:user).result.password

.

.

Thanks for your help.

 

Regards

Grace

 

I want to expose some content on a sites VF page. There are some complex business rules to determine which users get access to which content, so I can't use any standard functionality.

 

Here's the VF page

 

<apex:page action="{!showContent}" contentType="application/octet-stream" controller="MyDocsController" showHeader="false" sidebar="false">
<apex:outputText value="{!contentBody}" escape="false"/>
</apex:page>

 

<apex:page action="{!showContent}" contentType="application/octet-stream" controller="MyDocsController" showHeader="false" sidebar="false">

<apex:outputText value="{!contentBody}" escape="false"/>

</apex:page>

 

Here's the relevant part of the controller:

 

 

public pageReference showContent() {

...

ContentVersion theDoc = [select id, VersionData from contentVersion where id = :docId];

contentBody = theDoc.VersionData;

...

 

 

 

When I invoke this page from  .../apex/ShowContent?docId=068... my browser downloads a file called "ShowContent".

The body of this file is the text core.filemanager.FileBlobValue@1e74039

 

I have 2 questions:

1) Is there any way for me to change the file to something sensible, such as the filename in the contentVersion object

2) How can I get at the actual BLOB as a stream of bytes instead of a pointer reference.

 

 

Thanks,

David.

I'm writing a VF page to implement the following business requirement.

 

Allow user to select multiple partner accounts.

For each line item associated with the current opportunity, allow user to enter a percentage split to a partner.

 

If the line items on the current opp are {foo, bar} and the partners selected are {acme, widgetCo} this implies generating a table such as this

 

Partner: acme     Prod   Split %

                                 foo        10

                                 bar         0

 

Partner: widgetCo Prod   Split %

                                 foo        20

                                 bar        25

 

Where split % numbers are entered by the user. I can render it as a datatable inside a datatable, but I the product split information about the partner "acme"

 

How do I do this in VF?

 

 

Message Edited by dj_saaspoint on 10-15-2009 08:13 AM

Hi,

 

I'm trying to include a lookup on a VF page. I tried the solution described here http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=5752&query.id=210458#M5752 and here http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=14403&query.id=210458#M14403

but they don't work for me :( 

 

Here's the code

 

<apex:page standardcontroller="Account" tabStyle="Com_Splits__c" extensions="PartnerSplitExtension">

<apex:form id="myform">

<apex:inputText value="{!PartnerAccount.Name}" />

...

 

public with sharing class PartnerSplitExtension {

public Account getPartnerAccount(){

return [select name from account limit 1];

}

... Constructor and stuff 

 

 

The result is an input text box populated with the first account found in the query.

 

What am I doing wrong?

 

Many thanks in advance. 

 

 

I want to expose some content on a sites VF page. There are some complex business rules to determine which users get access to which content, so I can't use any standard functionality.

 

Here's the VF page

 

<apex:page action="{!showContent}" contentType="application/octet-stream" controller="MyDocsController" showHeader="false" sidebar="false">
<apex:outputText value="{!contentBody}" escape="false"/>
</apex:page>

 

<apex:page action="{!showContent}" contentType="application/octet-stream" controller="MyDocsController" showHeader="false" sidebar="false">

<apex:outputText value="{!contentBody}" escape="false"/>

</apex:page>

 

Here's the relevant part of the controller:

 

 

public pageReference showContent() {

...

ContentVersion theDoc = [select id, VersionData from contentVersion where id = :docId];

contentBody = theDoc.VersionData;

...

 

 

 

When I invoke this page from  .../apex/ShowContent?docId=068... my browser downloads a file called "ShowContent".

The body of this file is the text core.filemanager.FileBlobValue@1e74039

 

I have 2 questions:

1) Is there any way for me to change the file to something sensible, such as the filename in the contentVersion object

2) How can I get at the actual BLOB as a stream of bytes instead of a pointer reference.

 

 

Thanks,

David.

I'm writing a VF page to implement the following business requirement.

 

Allow user to select multiple partner accounts.

For each line item associated with the current opportunity, allow user to enter a percentage split to a partner.

 

If the line items on the current opp are {foo, bar} and the partners selected are {acme, widgetCo} this implies generating a table such as this

 

Partner: acme     Prod   Split %

                                 foo        10

                                 bar         0

 

Partner: widgetCo Prod   Split %

                                 foo        20

                                 bar        25

 

Where split % numbers are entered by the user. I can render it as a datatable inside a datatable, but I the product split information about the partner "acme"

 

How do I do this in VF?

 

 

Message Edited by dj_saaspoint on 10-15-2009 08:13 AM

Hi all-

 

I'm wondering if there is a way to define a proxy in the HTTPRequest methods?  I'm trying to access a web service that requires authentication.  Perhaps I can authenticate using the setHeader? 

 

Here is an example of the service i'm trying to hit... 

 

http://findv3.staging.mappoint.net/Find-30/FindService.asmx?wsdl

 

 

Cheers, 

 

BW

Message Edited by savvyboarder on 04-01-2009 02:46 PM
Hi all,

I am new for Apex development. So please help me out. Any help will be appreciable.
Currently I am using a function in our application in which I am retrieving data from external web services and storing it in Salesforce database. I am calling this function in a ‘for’ loop because this is getting called multiple times based on the selection of checkboxes. At 1st time, this function is working properly but 2nd time, It's giving exception which is as follows:
ERROR: System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out.

Below is the function which is getting called multiple times:
WebService static void getContent(String id)
{
    String response = '';
    Http h = new Http();
    HttpRequest req = new HttpRequest();
    String url = 'url of the web service';
    req.setEndpoint(url);
    req.setMethod('GET');
    HttpResponse res=null;
    try {
        res= h.send(req);
    } catch(System.CalloutException e) {
    System.debug('ERROR: '+ e);
}

Thanks,
Manjiri