• natemanley
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 7
    Replies
I have created a very simple S-Control that is triggered as a pop-up from a button on the Lead Detail page.

The control is designed to make a small edit to the record then refresh the parent window and then close itself.

When a Validation Rule does not allow the Lead record to be updated I can not get the SaveResult object to return any errors.  After looking at the success property I would assume the record had been updated however, no update occurrs.

How do I handle Validation Rule errors using the API in an S-Control???

The SaveResult.success property is true - which I would expect would be false.
The SaveResult.id field is blank - which is expected because no records were updated
The SaveResult.errors object is undefined - which I would expect would have the error message from the Validation Rule.

Here is my code...very simple:
    var soql = "select Id, Status from Lead where id = '" + leadId + "' ";

    var qryResult = sforce.connection.query(soql);

    var leadQry = qryResult.getArray("records");

    if (leadQry.length == 1)
    {
        leadQry[0]["Status"] = status;

        var saveResult = sforce.connection.update(leadQry);

        if (saveResult[0].success)
        {
                alert("Successfully submitted for approval.");
                CloseWindow();
        }
        else
        {
            alert("Submit for Approval failed.\n\nError:\n" + saveResult[0].errors[0].message);
        }
    }
Does anyone know how to get usage data on how often reports are getting accessed?  For example last run dates and maybe even who last ran them?
 
We have built up quite a mess of reports and our biz users are taking on a clean up effort.  They have asked us in IT to help them determine which reports are being used.
We have done a tone of development that integrates with SF via the .NET Data Provider (found on SourceForge). We currently are using a single user that is our API user...meaning it is a non-human user...soley for the purposes of connecting from integration applications.

This API user sometimes is logging in as frequently as every 1-2 seconds.

Lately we have seen an huge increase in the amount of time out errors from SF:
"The underlying connection was closed: An unexpected error occurred on a send."
"Could not establish secure channel for SSL/TLS"

Is there any reason to think that very frequently logins by the same user trip on themselves? Doesn't really make any sense but wanted ask.

Thanks.
I am not yet able to verify this in production but this is what I am experiencing in the test instance SF environment:

I have a custom link on the Opportunity that I was having it pass in the AccountId for the opportunity like this:

http://site/page.aspx?sfacctid={!Account_ID}
- From the Account Merge Fields

What I noticed is that if the opportunity has a Contact on it flagged as the primary and that contact is on a different account from the opportunity that my custom link passed in the AccountId for the contact and not the Account Id for the opportunity.

I changed my custom link to this:

http://site/page.aspx?sfacctid={!Opportunity_Account_ID}
- From the Opportunity Merge Fields

Now all is well and the Account Id passed is not sensitve the primary contact and all is well.

Can anybody explain why Salesforce works this way? Why {!Account_ID} from an Opportunity's point of view depends on the Contact flagged as the Primary?

Or is this a bug?

I am using the latest version of the .net data provider and I have some code that does something similar to the following this is just an example, I actually have a ton of fields in my insert statement so this is just here for the concept.

SforceCommand cmd = new SforceCommand("INSERT INTO LEAD (Email, FirstName, LastName, Company, Status) VALUES (@Email, @FirstName, @LastName, @Company, @Status)");

cmd.Parameters["@Email"].Value = " myemail@company.com ";
cmd.Parameters["@FirstName"].Value = "first";
cmd.Parameters["@LastName"].Value = "last";
cmd.Parameters["@Company"].Value = "Company Name";
cmd.Parameters["@Status"].Value = "New";

int i = cmd.ExecuteNonQuery();

After the ExecuteNonQuery is done i = 0 - so I know nothing happened.  Also, I don't get any results in Salesforce.  However, it doesn't throw any exceptions at all.  So where do I go to look for the SOAP messages that might have some meaningful descriptions of the error that occurred?

Curious if there is a way to in effect "click" the Enable Self-Service button that is in SalesForce on the contact detail screen?  And still having SalesForce send out the contact's email with their username and password.

For various reasons I am looking for a way to automatically set users up for access to the SSP, avoiding a human having to find a customers contact record and clicking the button to setup the users.  Picture a batch process that looks for accounts that have a certain Asset record and if so automatically set each contact on that account up with access to the SSP.  We also have a large amount of contacts from our old CRM to import into SalesForce.  This set of contacts also needs to be setup with SSP access, it would be nice to not have to have a human touch a few thousand records to accomplish this.

I have created a very simple S-Control that is triggered as a pop-up from a button on the Lead Detail page.

The control is designed to make a small edit to the record then refresh the parent window and then close itself.

When a Validation Rule does not allow the Lead record to be updated I can not get the SaveResult object to return any errors.  After looking at the success property I would assume the record had been updated however, no update occurrs.

How do I handle Validation Rule errors using the API in an S-Control???

The SaveResult.success property is true - which I would expect would be false.
The SaveResult.id field is blank - which is expected because no records were updated
The SaveResult.errors object is undefined - which I would expect would have the error message from the Validation Rule.

Here is my code...very simple:
    var soql = "select Id, Status from Lead where id = '" + leadId + "' ";

    var qryResult = sforce.connection.query(soql);

    var leadQry = qryResult.getArray("records");

    if (leadQry.length == 1)
    {
        leadQry[0]["Status"] = status;

        var saveResult = sforce.connection.update(leadQry);

        if (saveResult[0].success)
        {
                alert("Successfully submitted for approval.");
                CloseWindow();
        }
        else
        {
            alert("Submit for Approval failed.\n\nError:\n" + saveResult[0].errors[0].message);
        }
    }
Hi,
I'm trying to use the setup style in my  visual page with no success.
 
Code:
<apex:page setup="true"  controller="mycontroller" showHeader="false">

 Any Idea?

  
i get assertion invalid in login history. The login history entry is associated with the correct user, so its roughly correct
 
<?xml version="1.0" encoding="utf-8"?>
<samlp:Response xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" IssueInstant="2008-09-10T22:17:41.6221441Z" MajorVersion="1" MinorVersion="1" Recipient="http://localhost:9000" ResponseID="7a2adffa-fb5b-470e-8ca9-aae4206f465e" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol">
  <samlp:Status>
    <samlp:StatusCode Value="samlp:Success" />
  </samlp:Status>
  <saml:Assertion AssertionID="1f22e43a-3299-46d4-9510-ba6ebe6235b4" IssueInstant="2008-09-10T22:17:41.6221441Z" MajorVersion="1" MinorVersion="1" Issuer="ent2k3">
    <saml:AuthenticationStatement AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password" AuthenticationInstant="2008-09-10T22:17:41.6221441Z">
      <saml:Subject>
        <saml:NameIdentifier>paulmoore100@hotmail.com</saml:NameIdentifier>
      </saml:Subject>
    </saml:AuthenticationStatement>
  </saml:Assertion>
</samlp:Response>
  • September 10, 2008
  • Like
  • 0
Is there any way in the API to disable all data validation rules for the current session?
 
If not this would be a very important tool espcially in the case of Merge and LeadConvert calls when bad data is merged with bad data.  Ideally we would have the ability in the header to turn off the validation rules for the current session.
 
Glenn Wilson

We're in the process of converting to Salesforce.com... Our current (old, pure ASP.NET based) self-service contains a number of services that are specific to the customers but that the Salesforce.com self-service portal doesn't provide (for example, download registered products).

We'd like to avoid requiring customers to have two sets of username/password combinations.

At this point, the only solution we can see is to still use our own username/password and replicate the Salesforce self-service interface in ASP.net (calling SOAP in the background in real time).  This seems like a lot of work (especially when the tree-base knowledgebase comes out with Winter 05), and we'd be concerned about performance.

So is there anyway to either transfer the user's login creditials in either direction? I haven't looked into how Microsoft Passport does this, but they seemed to have found a way to do this.

Thanks!

-- Mike