• jeselon
  • NEWBIE
  • 0 Points
  • Member since 2004

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

When I query for the name of a Profile, I get values such as PT1 for System Administrator, PT2 for Standard User, etc.  The names for custom profiles seems to retrieve what is actually shown on the website just fine.

Is there a way to retrieve names as they are shown on the site for the profiles that start with PT?

Thank you.

I'm using the Partner WSDL in a VB.NET development environment.  I was looking through the sforce API documentation and noticed that the Login samples provide different ways of catching exceptions between Java and C#.  Looking at the sample code below, Java seems to be more specific as far as its ability to distinguish the exceptions, with the use of ExceptionCode:

try
{
loginResult = binding.login(userName, password);
}
catch (LoginFault ex)
{ //The LoginFault derives from AxisFault
ExceptionCode exCode = ex.getExceptionCode();
if (exCode == ExceptionCode.INVALID_LOGIN...

In .NET, the closest method I saw to be similar to .getExceptionCode() is .GetBaseException().  However, I am unable to create an ExceptionCode object, nor am I able to make a reference such as "ExceptionCode.INVALID_LOGIN".

The Java sample distinguishes between a login error caused by an invalid user id and password vs. other faults (it seems like there numerous Exception Codes that can be considered as the cause for an invalid userid and password).  I would like to do this as well in VB.NET, in order to display a more informed error message to the user.

Any help would be appreciated.  Thank you.

I am working with the Partner WSDL in the .NET environment.  I have a web form where I ask current Salesforce users for their Salesforce username and password.  I will be using this information to login and make various API calls.

What I would like to do is verify if the username and password that they have provided are valid.  Note that at this time, I am only asking for the information because this is a "registration process."  I will actually be logging in and making calls to the API at a later time.  What would be the best way to implement this?  Does the API have functionality that can be utilized?

Also, is there a way to find out at this time whether a specific user (username and password) has permissions to invoke API calls, such as query and create?

Any help would be greatly appreciated.  Thank you.

 

  • September 29, 2004
  • Like
  • 0

Is it possible to create Web Tabs via the sForce API?

  • September 23, 2004
  • Like
  • 0

I tried creating web links but they do not seem to show up, for example, under "Studio - Customize - Accounts - Web Links".  I'm using the following VB.net code to do it:

        Dim webLink As New sforce.sObject
        Dim webLinkArray(0) As sforce.sObject

        Dim webLinkXmlElement(5) As Xml.XmlElement
        Dim webLinkXmlDoc As New Xml.XmlDocument

        webLinkXmlElement(0) = webLinkXmlDoc.CreateElement("LinkType")
        webLinkXmlElement(0).InnerText = "URL"
        webLinkXmlElement(1) = webLinkXmlDoc.CreateElement("Name")
        webLinkXmlElement(1).InnerText = "WIL from code"
        webLinkXmlElement(2) = webLinkXmlDoc.CreateElement("OpenType")
        webLinkXmlElement(2).InnerText = "Sidebar"
        webLinkXmlElement(3) = webLinkXmlDoc.CreateElement("PageEnumOrId")
        webLinkXmlElement(3).InnerText = "AccountDetail"
        webLinkXmlElement(4) = webLinkXmlDoc.CreateElement("Url")
        webLinkXmlElement(4).InnerText = "http://www.google.com"
        webLinkXmlElement(5) = webLinkXmlDoc.CreateElement("EncodingKey")
        webLinkXmlElement(5).InnerText = "Unicode (UTF-8)"

        webLink.type = "WebLink"
        webLink.Any = webLinkXmlElement

        webLinkArray(0) = webLink

        Dim sr() As sforce.SaveResult = binding.create(webLinkArray)

Am I missing a field that is required?  I just started using the Parter WSDL, so I am still a bit unfamiliar with it vs. the Enterprise WSDL.

Also, what are the valid values for EncodingKey?

Any help would be appreciated.  Thank you.

 

  • September 17, 2004
  • Like
  • 0

When I send an attachment back to, for example, a specific Contact via the API - a link in provided to "View the file."  On some of the computers that we have, the attached file opens properly on a separate web browser (it is a PDF file).  However on some of our other computers, a new browser is opened, but simply displays a blank.

The file is there - I was wondering if there is a setting I can change somewhere (possibly on the browser, we're using IE) to have the file properly open on all our systems.  Anyone else encounter this?

Thanks.

 

Is there a way to display only certain Web Integration Links to a user based on the Role of that user?

Thank you.

 

We have encountered the same javascript error.  We think we have determined the problem and have a potental fix.  We have to sample attachments.  Is it possible to send to you.

Pre-condition:

We have created a Web Integration Link under the Contacts tab, which opens in the salesforce.com window (in frame).

 

Steps to reproduce:

  1. Click on the Web Integration Link to go to the specified site.
  2. Click on a link on the site to go to a different page on that site.

 

Expected Results:

After this second page completes loading, the javascript error occurs.  This can be identified with the Error icon on the bottom left of the Internet Explorer window.

 

 

Findings:

This error occurs on every page that is visited on that linked site, except the first page that the Web Integration Link points to.  This happens on both salesforce inframe window open options (with sidebar and without sidebar).

 

We discovered that the following line of code in the doResize() function was causing the error:

 

                ifr.style.height = Math.max(ifr.style.height, newHeight);

 

We created the attached html pages using the same javascript code and iframe setup found on the salesforce page.  The iframe points to www.dell.com.

 

The error occurs due to the following:

The value of ifr.style.height contains the characters â¬?pxâ¬? at the end, for example, 672px.  This was being compared to the value of newHeight, which didnâ¬?t have the â¬?pxâ¬? at the end.  The â¬?pxâ¬? was possibly causing the â¬?invalid argumentâ¬? error.

 

In the attached html file suffixed with â¬?modifiedâ¬?, we replicated the iframe setup and doResize() function used the SalesForce website.  Changes were made to the doResize() function such that the â¬?pxâ¬? is removed before it is passed into the doResize() function.  With this change, the error no longer occurs.  The html document suffixed with â¬?errorâ¬? is a copy of the existing SalesForce code â¬? and still causes the error.

 

There is debugging code in the html files that displays the values of ifr.style.height and newHeight each page loads.

 

 

 

The error indicates that there is an invalid argument in this line, which is part of the salesfoce html:

ifr.style.height = Math.max(ifr.style.height, newHeight);

any thoughts would be appreciated.

 

Is is possible to add my own entry into the 'Activity History' list sections via the sForce Web Service API?  What sForce object would I use, if this is possible?

Also, is there such a thing as a 'generic' sForce object?

Thanks.

 

Hello.  I would like to use the contact mailing address in my WIL.  However, using that particular merge field - {!Contact_MailingAddress} in this case - causes problems in the URL if the address field contains newline characters, i.e.:

    75 Grove Street

    Suite 800

 

The error indicates that redirect URLs cannot contain newline characters.  Any help would be much appreciated.  Thank you

 

Is it possible to add Web Integration Links to Custom Objects/Tabs?  I would like them to be part of my custom tab, like how they are parts of the other tabs such as Opportunities, Cases, etc...

Thanks! =)

 

I tried creating web links but they do not seem to show up, for example, under "Studio - Customize - Accounts - Web Links".  I'm using the following VB.net code to do it:

        Dim webLink As New sforce.sObject
        Dim webLinkArray(0) As sforce.sObject

        Dim webLinkXmlElement(5) As Xml.XmlElement
        Dim webLinkXmlDoc As New Xml.XmlDocument

        webLinkXmlElement(0) = webLinkXmlDoc.CreateElement("LinkType")
        webLinkXmlElement(0).InnerText = "URL"
        webLinkXmlElement(1) = webLinkXmlDoc.CreateElement("Name")
        webLinkXmlElement(1).InnerText = "WIL from code"
        webLinkXmlElement(2) = webLinkXmlDoc.CreateElement("OpenType")
        webLinkXmlElement(2).InnerText = "Sidebar"
        webLinkXmlElement(3) = webLinkXmlDoc.CreateElement("PageEnumOrId")
        webLinkXmlElement(3).InnerText = "AccountDetail"
        webLinkXmlElement(4) = webLinkXmlDoc.CreateElement("Url")
        webLinkXmlElement(4).InnerText = "http://www.google.com"
        webLinkXmlElement(5) = webLinkXmlDoc.CreateElement("EncodingKey")
        webLinkXmlElement(5).InnerText = "Unicode (UTF-8)"

        webLink.type = "WebLink"
        webLink.Any = webLinkXmlElement

        webLinkArray(0) = webLink

        Dim sr() As sforce.SaveResult = binding.create(webLinkArray)

Am I missing a field that is required?  I just started using the Parter WSDL, so I am still a bit unfamiliar with it vs. the Enterprise WSDL.

Also, what are the valid values for EncodingKey?

Any help would be appreciated.  Thank you.

 

  • September 17, 2004
  • Like
  • 0

I have a web integration link that embeds our web site within the SF navigation.

In IE6 I get a javascript error from the embedding SF page when a new page loads.

The error is "Invalid argument on line 263" which is the line:

  ifr.style.height = Math.max(ifr.style.height, newHeight);

in the JavaScript block:

function doResize(){

    var ifr = document.getElementById("itarget");

    var newHeight = 600;

    if (ifr && ifr.document && ifr.document.body) {

        if (ifr.document.body.scrollHeight){
            newHeight = Math.max(newHeight, ifr.document.body.scrollHeight);
        }
        if (ifr.document.body.clientHeight){
            newHeight = Math.max(newHeight, ifr.document.body.clientHeight);
        }
        if (ifr.document.body.offsetHeight){
            newHeight = Math.max(newHeight, ifr.document.body.offsetHeight);
        }
        if (ifr.document.body.height){
            newHeight = Math.max(newHeight, ifr.document.body.height);
        }
    }

    ifr.style.height = Math.max(ifr.style.height, newHeight);

}

Looking for this same error in FireBird (where I would get a better error message) I do not get the error at all.

Any thoughts?

Alon / Carbonfive

Message Edited by carbonfive on 04-23-2004 10:57 AM