• Michael.Watkins
  • NEWBIE
  • 0 Points
  • Member since 2008

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

we are getting this error in the errors collection of the sforce.SaveResult object from our dev account coming out of sales force self service portal when creating a case.  the error looks to be pointing to code residing on sf side, or at least, a very ungraceful error handling routine residing there.

 

the same code runs against a production account with no errors, so it is only happening on dev instance.  any insight would be appreciated.

"copyVersionCases: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.copyVersionCases: line 18, column 59"

thanks!

when creating a case through the api in the below sample code, the case is created without error and all specified fields populate except Reproduced__c, which is a custom field of boolean type. when debugging, m_Reproduced is boolean and contains valid data. and i have tried values of both True and 1. yet neither value seems to have an effect- the field simply will not set via api, but i can set it through the salesforce web interface if i edit the case.

i also tried to manually set other, non-custom fields like IsClosed on create and those values did not take either.

any insight is greatly appreciated.


                Dim oCase As New sforce.Case()
                With oCase
                    .ContactId = m_ContactID
                    .Type = m_CaseType
                    .CreatedDate = Date.Now
                    .Description = m_CaseDescription
                    .Product__c = m_Product
                    .Steps_to_Reproduce__c = m_StepsToReproduce
                    .STT_Version_Number__c = m_VersionNumber
                    .Subject = m_Subject
                    .Component__c = m_Component
                    .Reproduced__c = m_Reproduced
                End With

                Dim oSaveResult() As sforce.SaveResult
                oSaveResult = oProxy.create(New sObject() {oCase})
this seems like a very simple thing, but i have yet to figure out how to "join" solutions to solution categories or even categorydata to categorynodes.  apex explorer 8 indicates the child relationships but soql complains about everything i have tried, as if the relationships don't really exist or are not accessable.

can anyone paste in a soql query that accomplishes this or point me in the right direction?

something like:
SELECT cn.MasterLabel, s.SolutionName
FROM CategoryNode cn
INNER JOIN CategoryData cd ON cd.CategoryNodeID=cn.ID
INNER JOIN Solution s ON s.Id=cd.RelatedSobjectID

or, if this query just isn't possible, what are you guys doing to accomplish


many thanks
Does anyone have information on the process of closing a case via the API?
What objects must be manually updated or touched during the process besides the obvious Case.ClosedDate and Case.IsClosed fields?
 
Thanks in advance
any ideas how one would mimic the portal search solution functionality by solution category?

oSearchResult = oProxy.search("find {" & searchString & "} in Solution fields returning Solution (Id, CreatedDate, LastModifiedDate, SolutionName)")

the only thing i can think of is to search solutions as referenced above, and then loop thru the categorydata by RelatedSobjectId after-the-fact with additional calls. the downside is this would burn several api calls and seems a backwards approach to what i need-

which is something like:
SELECT ID, SolutionName, LastModifiedDate, cn.MasterLabel FROM Solution s
INNER JOIN CategoryData c ON c.RelatedSobjectId=s.ID
INNER JOIN CategoryNode cn ON cn.
ParentId=c.CategoryNodeId
WHERE cn.MasterLabel='[Desired_CategoryName_Filter]'

thanks-

anyone have a vb.net example for populating a dropdown list dynamically based on the controller selected value?

this seems like such a simple thing to expect from the API, but i have had no real success so far in converting the java or c# samples provided by the api documentation.

thanks in advance
Hi to all,

I would to know if anyone was able to access to the self service portal user's passwords.
In my company we already give credentials to the users and we don't want to give two different credentials to the users (one for our server, other for the SSP).

Doing some experiments with javascript (AJAX tools) I was able to set a new password to each user, but I don't think this is the best approach, because until now  I was unable to override the "reset password" method.

I also read that exists one approach based on database synchronization,  but I didn't find any too much information about this.

So my questions are:

1) how to get the ssp user's passwords (if it's possible)
2) how to override the reset password button
3) Where can I find information about database synchronization

Thanks in advance
HDLP
  • September 11, 2008
  • Like
  • 0

we are getting this error in the errors collection of the sforce.SaveResult object from our dev account coming out of sales force self service portal when creating a case.  the error looks to be pointing to code residing on sf side, or at least, a very ungraceful error handling routine residing there.

 

the same code runs against a production account with no errors, so it is only happening on dev instance.  any insight would be appreciated.

"copyVersionCases: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.copyVersionCases: line 18, column 59"

thanks!

when creating a case through the api in the below sample code, the case is created without error and all specified fields populate except Reproduced__c, which is a custom field of boolean type. when debugging, m_Reproduced is boolean and contains valid data. and i have tried values of both True and 1. yet neither value seems to have an effect- the field simply will not set via api, but i can set it through the salesforce web interface if i edit the case.

i also tried to manually set other, non-custom fields like IsClosed on create and those values did not take either.

any insight is greatly appreciated.


                Dim oCase As New sforce.Case()
                With oCase
                    .ContactId = m_ContactID
                    .Type = m_CaseType
                    .CreatedDate = Date.Now
                    .Description = m_CaseDescription
                    .Product__c = m_Product
                    .Steps_to_Reproduce__c = m_StepsToReproduce
                    .STT_Version_Number__c = m_VersionNumber
                    .Subject = m_Subject
                    .Component__c = m_Component
                    .Reproduced__c = m_Reproduced
                End With

                Dim oSaveResult() As sforce.SaveResult
                oSaveResult = oProxy.create(New sObject() {oCase})

I need to authenticate self-service users, but don't want to use the self-service login page (I want to create a new page that accepts self-service username and password).

I don't want to create a user database to authenticate the self-service users as suggested in other posts, and I also don't want to use a single password solution as suggested in other posts.

From the documentation this may be done through LoginScopeHeader, but I can't find any code samples that do that.

Does anybody have a good sample that authenticates an existing self-service user?  (using LoginScopeHeader or not)

  • April 23, 2008
  • Like
  • 0
We are developing an SFDC API solution and have run into a problem when trying to query for solutions and filter by the solution category. We need to return the solutions and filter by the category in a single query call if possible or else use multiple queries very quickly.
 
Here are a couple of ones we tried but received an invalid field or invalid relationship exception.
 
binding.query("Select Id, SolutionName, SolutionNote from Solution where " & _
CategoryData.CategoryNodeId = "searchStringHere" LIMIT 100")
 
binding.query("Select Id, (Select CategoryNodeId From Categorydata where CategoryNodeId = "searchStringHere"), SolutionName, SolutionNote from Solution LIMIT 100")
 
Any help you can provide is appreciated.
I've got a relatively simple little setup to test out retrieving some salesforce data.  I can't quite get the records to retrieve the data inside them however (like first name, last name, etc.).  Here's what I've got:

<cfset queryName = sfObject.query("SELECT firstname FROM contact")>
<cfset queryRecords = queryName.getRecords()>
<cfdump var="#ArrayLen(queryRecords)#">
<cfdump var="#sfObject.describeGlobal().getTypes()#">

As you can see I'm using CF.  I was breaking down the objects with cfdump and figuring out what methods were inside each class, but I've come to a stopping point where I can't figure out how to retrieve the exact data I need (such as first name).  The query executes correctly (as I tested incorrect ones out to make sure) but using things like:

queryRecords.firstname
or
queryRecords[1].firstname

doesn't work (although the second one appears to be more correct).  There should be 21 objects inside of queryRecord so queryRecord[1] should be perfectly fine (per the array length check).  Other websites I've checked out have done it just like this, with a loop around what should be the record result set to output all of the results they retrieve.

Thanks in advance :)
  • April 17, 2008
  • Like
  • 0

Hi,

  I am using Enterprise WSDL with VB.Net 2.0. I Want to return ADO.NET datatabe / dataset  based on the below code:-

 

Dim qr As QueryResult = Nothing

qr = binding.query("select id, Website, Name from Account")

If qr.size > 0 Then

Dim account As Account = CType(qr.records(0), Account)

Dim Id As String = account.Id

Dim Website As String = account.Website

 End If

  • So, I would like to return all the rows of account QueryResult  as a datatable ? What would be the best way? 
  • Do you provide any CreateDataTable methods in the webservice ?

Regards,

this seems like a very simple thing, but i have yet to figure out how to "join" solutions to solution categories or even categorydata to categorynodes.  apex explorer 8 indicates the child relationships but soql complains about everything i have tried, as if the relationships don't really exist or are not accessable.

can anyone paste in a soql query that accomplishes this or point me in the right direction?

something like:
SELECT cn.MasterLabel, s.SolutionName
FROM CategoryNode cn
INNER JOIN CategoryData cd ON cd.CategoryNodeID=cn.ID
INNER JOIN Solution s ON s.Id=cd.RelatedSobjectID

or, if this query just isn't possible, what are you guys doing to accomplish


many thanks
Does anyone have information on the process of closing a case via the API?
What objects must be manually updated or touched during the process besides the obvious Case.ClosedDate and Case.IsClosed fields?
 
Thanks in advance
anyone have a vb.net example for populating a dropdown list dynamically based on the controller selected value?

this seems like such a simple thing to expect from the API, but i have had no real success so far in converting the java or c# samples provided by the api documentation.

thanks in advance
How do you run an API call to get picklist data to fill a dropdown in .NET VB would be the easiest for me. What I am trying to do is get a list of case origins which is a picklist object to fill a drop down in my external API based application. I am reading, creating new and updating records but for some reason this is not easy for me to figure out.
I'm lookning for a list of Tables, fields, data types and lengths. I have searched high and low with no luck. I hav downloaded the getting started guid, the programmers reference, etc and found no reference to this in any of them.

Could some kind soul here please point me in the right direction?

I found a schma but it only lists the keyfields and the links...

Thanks in advance,

Daniel
Hi, I am using asp.net vb and I am returning a results of object from this query

 qr = x.query("SELECT Amount, Id, Name, (SELECT Quantity, ListPrice, PriceBookEntry.UnitPrice, PricebookEntry.Name, PricebookEntry.product2.Family FROM OpportunityLineItems)FROM Opportunity where  Opportunity.Pricebook2Id<> null")


I am trying to list the "ListPrice" from the sub query, I can see it in the object explorer but do not know know how to reference it, in the code below it is the variable price2 that I am trying to assign to "listprice". I have tried attempting to cast  the query result record to "OpportunityLineItem" but get errors, also tried using a function call GetPrice but still casting errors. Can someone please point me in the right direction.


  dt.Columns.Add(New DataColumn("Id"))
                dt.Columns.Add(New DataColumn("Oppurtunity Name"))
                dt.Columns.Add(New DataColumn("Price"))
              
                Do While (i < qr.records.Length)
                    Opportunity = CType(qr.records(i), Opportunity)
                    id = Opportunity.Id
                    Name = Opportunity.Name
                    Price = Opportunity.Amount
                    Dim price2 = Opportunity.OpportunityLineItem.listprice
                    dt.Rows.Add(id, Price, Name)
                    i = (i + 1)
                Loop



 Function GetPrice(ByVal qr As sforce.QueryResult)
        Dim OpportunityLineItem As New sforce.OpportunityLineItem

        If qr.size > 0 Then
            Dim Product2 = CType(qr.records(0), OpportunityLineItem)
            Return OpportunityLineItem.ListPrice
        End If

    End Function
I'm new to Apex, SOQL and the entire Salesforce world, so please forgive me if this is a silly question.

I'm working with a partner who has grouped their Soultion objects into categories. I can see these groupings with no problem in the UI of the Salesforce dashboard (Solutions tab), but cannot for the life of me conjure up the correct SOQL query to get a list of Solutions for a particular category.

For example, here's a query that seems reasonable based on what I've read in the documentation. Result *should* be an array of SolutionNames and SolutionNotes for Solutions in the category 'Foo'.

Code:
SELECT
   SolutionName, SolutionNote,
   (SELECT
       CategoryNode.MasterLabel
   FROM CategoryNode
   WHERE
      MasterLabel = 'Foo')
FROM Solution

 

Instead, I am treated to this error: INVALID_TYPE: Didn't understand relationship 'CategoryNode' in FROM part of query call. If you are attempting to use a custom relationship ...

For something as straightforward as "give me a list of Solutions within Category 'Foo'", I feel like I'm having a harder time than I should be.

What obvious thing am I missing? :)

Thank you!