• Graham
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 7
    Replies
I'm looking at some partner forms, and it says:

"If you exercise the query and querymore calls, provide a capture of the message body for all of your static queries."

I'm using ASP.Net and vb, how do I go about capturing this message?
The sforce Partner documentation says that any stored passwords need to be stored encrypted at 128-bit or better. I'm not very familiar with encryption in VB.Net, can anyone recommend some sample code, or what information I need to decrypt the stored password?

Thanks
Graham
  • April 07, 2004
  • Like
  • 0
Quick question. I'm looking to add the Data Model Viewer to an app to aid in Mapping Fields. By this I mean we take info from a Salesforce.com field (e.g. User's Email address) and put it into one of our fields, with a different name.

SO, it would be helpful when making these mappings to be able to browse the data tree and select fields. I know on the sforce sourceforge site it says the source will be available soon for the SOQL explorer, any ideas on when? Any suggestions on an easy way to implement this?

Thanks,

Graham
  • April 05, 2004
  • Like
  • 0
Dave- (or anyone else)
Using sforce API 2.5, VB.net 2003 and vis studio.net 2003. I had a similar problem with dates (few hours ago) and you said:



DevAngel wrote:

Hi Graham,

Because the partner api doesn't have the "smart" serialization that is the result of the Enterprise WSDL, the date needs to be specified as a string.






I totally understand the symptom and the workaround, but now I am faced with sending attachments. I obviously can't convert the doc to a string, so I have to legitimately set the type to base64. What's the easiest way to tackle this?

Thanks again for your help!
Graham

BTW My boss John told me to mention that I'm with Pragmatech, working on that eProposal integration.
  • March 10, 2004
  • Like
  • 0
I'm using VB.Net and the 2.5 sforce API. I'm writing some web forms in asp.net, basically I get passed an Opportunity ID, then query sforce for info. This info gets used in an app of ours, and new info is added. I have no problems querying, getting results, or updating an opportunity.

My problem is with creating a new Task. I'm using the partner api so I don't have the Task sObject, I just update records with a general sObject. This is fine so far, and I can query dates, but I don't know how to set the type in the xml to date. The error I get back is: java.lang.NumberFormatException: Invalid date. I know this is because I'm sending it a string instead of a date, but how do I change this?

Thanks so much!
Graham



My code (which has been pieced together mostly from the vb.net samples and this site:

Private Function MakeDateElement(ByVal fieldName As String, ByVal fieldValue As Date) As System.Xml.XmlElement

Dim frag As System.Xml.XmlDocument = New System.Xml.XmlDocument

Dim el As System.Xml.XmlNode = frag.CreateNode(Xml.XmlNodeType.Element, fieldName, "")

''This is what I want to somehow set, but how?:
''Set el Xml.Serialization.XmlElementAttribute(DataType:="date")

el.InnerXml = fieldValue

Return el

End Function

Private Sub createTask()
'Verify that we are already authenticated, if not
'call the login function to do so
If Not loggedIn Then
If Not login() Then
Return
End If
End If

Dim createdTask As New sObject

createdTask.type = "Task"

Dim record(5) As System.Xml.XmlElement

Try
Dim i As Integer
Dim taskArray(5, 1) As String
taskArray(0, 0) = "ActivityDate"
taskArray(1, 0) = "Description"
taskArray(2, 0) = "Priority"
taskArray(3, 0) = "Status"
taskArray(4, 0) = "Subject"
taskArray(5, 0) = "WhatId"

''tried this to get around the whole date/string thing: (didn't work)
''taskArray(0, 1) = "#" & DateTime.Now & "#"
taskArray(1, 1) = "Your Document has Assembled"
taskArray(2, 1) = "Normal"
taskArray(3, 1) = "Not Started"
taskArray(4, 1) = "Assembly Complete"
taskArray(5, 1) = sforceOpID

record(0) = MakeDateElement(taskArray(0, 0), DateTime.Today)
For i = 1 To 5
record(i) = MakeFieldElement(taskArray(i, 0), taskArray(i, 1))
Next

createdTask.Any = record

Dim saveResult As SaveResult() = binding.create(New sObject() {createdTask})
For i = 0 To 5 'saveResult(0).errors.GetUpperBound(0)
If saveResult(i).success Then
lbl5.Text = "A task: " & saveResult(i).id & " was updated."
Else
lbl5.Text = "Item" & i & " had an error updating."
lbl6.Text = "The error reported was: " & saveResult(i).errors(0).message
End If
Next
Catch ex As Exception

lbl6.Text = ex.Message

End Try

End Sub
  • March 10, 2004
  • Like
  • 0
Just getting started on working with sforce and .NET. Anyways, I have two quick question.

Basically, I will have an aspx page that will query salesforce.com through sforce. First, this aspx page will only get passed an Opportunity ID, do I have to give the server its own login so it can query sforce?

Second (please excuse my naivete), I have all the VB .NET samples, how do I use these on an aspx page?

Thanks much!
Graham
  • March 03, 2004
  • Like
  • 0
Hello,
I'm looking into using Salesforce.com and sforce.com for integration with a product of ours. What I'd like to do is add a button/link to the salesforce.com site so that when someone creates an opportunity, they click on one of two links with sends their info as an XML file to our server, and brings up the server page. Is this possible?
  • February 23, 2004
  • Like
  • 0
I'm looking at some partner forms, and it says:

"If you exercise the query and querymore calls, provide a capture of the message body for all of your static queries."

I'm using ASP.Net and vb, how do I go about capturing this message?
Quick question. I'm looking to add the Data Model Viewer to an app to aid in Mapping Fields. By this I mean we take info from a Salesforce.com field (e.g. User's Email address) and put it into one of our fields, with a different name.

SO, it would be helpful when making these mappings to be able to browse the data tree and select fields. I know on the sforce sourceforge site it says the source will be available soon for the SOQL explorer, any ideas on when? Any suggestions on an easy way to implement this?

Thanks,

Graham
  • April 05, 2004
  • Like
  • 0
Dave- (or anyone else)
Using sforce API 2.5, VB.net 2003 and vis studio.net 2003. I had a similar problem with dates (few hours ago) and you said:



DevAngel wrote:

Hi Graham,

Because the partner api doesn't have the "smart" serialization that is the result of the Enterprise WSDL, the date needs to be specified as a string.






I totally understand the symptom and the workaround, but now I am faced with sending attachments. I obviously can't convert the doc to a string, so I have to legitimately set the type to base64. What's the easiest way to tackle this?

Thanks again for your help!
Graham

BTW My boss John told me to mention that I'm with Pragmatech, working on that eProposal integration.
  • March 10, 2004
  • Like
  • 0
I'm using VB.Net and the 2.5 sforce API. I'm writing some web forms in asp.net, basically I get passed an Opportunity ID, then query sforce for info. This info gets used in an app of ours, and new info is added. I have no problems querying, getting results, or updating an opportunity.

My problem is with creating a new Task. I'm using the partner api so I don't have the Task sObject, I just update records with a general sObject. This is fine so far, and I can query dates, but I don't know how to set the type in the xml to date. The error I get back is: java.lang.NumberFormatException: Invalid date. I know this is because I'm sending it a string instead of a date, but how do I change this?

Thanks so much!
Graham



My code (which has been pieced together mostly from the vb.net samples and this site:

Private Function MakeDateElement(ByVal fieldName As String, ByVal fieldValue As Date) As System.Xml.XmlElement

Dim frag As System.Xml.XmlDocument = New System.Xml.XmlDocument

Dim el As System.Xml.XmlNode = frag.CreateNode(Xml.XmlNodeType.Element, fieldName, "")

''This is what I want to somehow set, but how?:
''Set el Xml.Serialization.XmlElementAttribute(DataType:="date")

el.InnerXml = fieldValue

Return el

End Function

Private Sub createTask()
'Verify that we are already authenticated, if not
'call the login function to do so
If Not loggedIn Then
If Not login() Then
Return
End If
End If

Dim createdTask As New sObject

createdTask.type = "Task"

Dim record(5) As System.Xml.XmlElement

Try
Dim i As Integer
Dim taskArray(5, 1) As String
taskArray(0, 0) = "ActivityDate"
taskArray(1, 0) = "Description"
taskArray(2, 0) = "Priority"
taskArray(3, 0) = "Status"
taskArray(4, 0) = "Subject"
taskArray(5, 0) = "WhatId"

''tried this to get around the whole date/string thing: (didn't work)
''taskArray(0, 1) = "#" & DateTime.Now & "#"
taskArray(1, 1) = "Your Document has Assembled"
taskArray(2, 1) = "Normal"
taskArray(3, 1) = "Not Started"
taskArray(4, 1) = "Assembly Complete"
taskArray(5, 1) = sforceOpID

record(0) = MakeDateElement(taskArray(0, 0), DateTime.Today)
For i = 1 To 5
record(i) = MakeFieldElement(taskArray(i, 0), taskArray(i, 1))
Next

createdTask.Any = record

Dim saveResult As SaveResult() = binding.create(New sObject() {createdTask})
For i = 0 To 5 'saveResult(0).errors.GetUpperBound(0)
If saveResult(i).success Then
lbl5.Text = "A task: " & saveResult(i).id & " was updated."
Else
lbl5.Text = "Item" & i & " had an error updating."
lbl6.Text = "The error reported was: " & saveResult(i).errors(0).message
End If
Next
Catch ex As Exception

lbl6.Text = ex.Message

End Try

End Sub
  • March 10, 2004
  • Like
  • 0

I updated the wsdl file in Visual Studio and now I get the error stating that sObject is missing?

It was there in my previous file, where did it go?

  • February 24, 2004
  • Like
  • 0

Hello Folks,

Our customer wants about 10-12 custom fields in Opportunity. In addition to that they want a way to sum up all these fields (text box) and store it in another field (total amount field) (text box) and save it to Sales Force. Since the page https://na1.salesforce.com/006/e?retURL=%2F006%2Fo is developed by sales force, we have no way to add client side javascript to sum all these custom fields(in text boxes) and populate it to the total amount field(text box).

Any work arounds? Another proposed work around is the use of web integration link where we can create an HTML file that has client side JavaScript to read the fields in the parent window (SalesForce.com new opportunity page) and sum it up to populate the total amount field in the parent window. But we found that the web integration links can be accessed only after the "save" button is clicked to save the opportunity. At this time, the form fields (Custom fields as text boxes) are already submitted to salesforce and not accessible by my child web integration link.

Any thoughts / suggestions?

Thanks

Venk

Vdakshin@modelmetrics.com