• XXX
  • NEWBIE
  • 260 Points
  • Member since 2009

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 38
    Questions
  • 45
    Replies

Hi I am trying to use semi joins in a select statement but am not able to excute it, when i try the same in Apex Explorer it returns a message that semi joins are not supported in this method. Could some one tell me if I could use semi join in API version 15.0? 

Coming to the problem I have a custom object with a lookup relationship with the Product object. I have created a visual force page for new and edit of the custom object. What I would like to do is on clicking save, I want it to redirect to the Product details page for the product selected in the lookup. I am stuck in my controller class where I am not sure how to write the page reference to this. Any help would be great.

 

Thanks

KD

 

Could also tell how to truncate the 18 digit Id to a 15 digit one in Apex. 

 

Message Edited by kdmr on 05-21-2009 04:38 AM
  • May 21, 2009
  • Like
  • 0

I have a "Year Built" field on one of my objects, defined as a 4-digit number. It works fine except that it is always formatted as if it is a number: 2,009 instead of 2009. This is in a managed package, so I cannot delete the field or change the length of the field.

 

How can I format this field so that it appears as a year instead of a number?

 

Thanks,

 

John

  • September 18, 2009
  • Like
  • 0

I've read the online help for embedding SF documents into an HTML page, and it doesn't work for me.

 

Even if I were successful with the instructions as written, they still wouldn't work because I need to package this page up as part of an AppExchange application and therefore I cannot embed "na2.salesforce.com" into the URL.

 

I have marked the image (document) as externally available.

 

How do I embed a SF document into a VF page in such a way that I can package that page up as part of an AppExchange package?

 

Thanks,

 

John

  • September 18, 2009
  • Like
  • 0

I've read in the online help that you can enable the customer portal from Setup > Customize > Customer Portal. I don't have that option. I'm on EE.

 

Is there some additional step not documented in the help? Or did the process change?

 

TIA,

 

John

  • September 03, 2009
  • Like
  • 0

I've got a weird one this time. I have a VF page that I want to show instead of the standard page. I've set it up to override the standard page with the VF page and, as I understand it, the VF page should be used every time. Works great on the SF UI and, when I'm on the customer portal, works great when accessed directly.

 

However, when I am on the customer portal and I click on a link to that page, I am taken to the standard page instead of the VF page. (When I click on a link to that page from the SF UI, I go to the VF page.)

 

Am I doing something wrong and, if so, what?

 

TIA,

 

John

  • September 03, 2009
  • Like
  • 0

My understanding is that any call to the Salesforce API counts as an API call.

 

Say I have a Apex webservice that is called by an external application. This webservice makes a variety of Apex calls but does not itself make any API calls.

 

Do calls to my Apex webservice count against my API calls?

 

If so, how many? Is it a single API call because there is a single "call" to the webservice? Or does it count each individual Apex "statement" that is equivalent to an API call?

 

If not, does that mean I can wrap up my API calls into a webservice and bypass the API call counter?

 

As always,

 

TIA,

 

John

  • August 12, 2009
  • Like
  • 0

I have an S-Control that is failing. Assuming that my query is this:

 

SELECT id, lastname, contact.account.name FROM contact, contact.account

 

and that I have already gotten access to the id and lastname fields using contacts = queryResult.getArray('records'); and id = contacst[i].Id, how do I access the contact.account.name field? I assumed that contacts[i].Account.Name would do it, but of course it doesn't.

 

TIA,

 

John

 

 

 

 

 

 

  • August 05, 2009
  • Like
  • 0

Here's what we need to do: We need to add some special logic to a standard layout. We want to replace a standard layout field with a VF "page" that will encapsulate the special logic. (The user shouldn't be aware that anything is different.) I understand how to create the VF page but I cannot figure out how to style the label and field to look like the standard layout. If I do the standard thing:

 

<apex:pageBlock ...> <apex:form ...> <apex:pageSection ...> <apex:pageSectionItem ...> <apex:outputLabel ...> <apex:inputField ...>

 

 

 

I get a nicely formatted label and field, but the whole thing is wrapped up in the page block styling. I just want the label and field, but it should look exactly the same as the rest of the layout. How can I do this?

 

Secondary question: If I do this, and there is a form embedded inside the standard layout, will the page be saved correctly?

 

TIA,

 

John

  • August 03, 2009
  • Like
  • 0

I am working on a project where we need to replicate certain SF objects. After due research, I discovered the getUpdated() function, which is worked pretty well -- except for the Event object.

 

It just doesn't work. It fails silently, no error thrown, no result, the loop just stops.

 

Is this a reserved word issue? I am using C#, not VB.NET (which as I understand it does have a reserved word issue with the Event object).

 

Is this a bug or is there something I don't know yet?

 

TIA,

 

John

  • June 29, 2009
  • Like
  • 0

I just discovered that the last guy created two packages in my dev org, one Application Name and one Application Name - OLD. These aren't two VERSIONS of the application but rather two PACKAGES for the application. Obviously, Application Name - OLD has been deprecated and only Application Name is now available on the AppExchange.

 

My question is, can my customer who has already installed Application Name - OLD upgrade cleanly to Application Name?

 

TIA,

 

John

  • June 18, 2009
  • Like
  • 0

I've set the attribute to required="true" and as far as I can tell it has not effect at all.

 

I added an onsubmit javascript function:

 

function validateForm() { var fileVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileNameSection.theFile}").value; if ("" == fileVal) { alert("The File Name field is required."); return false; } var accessVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileAccessSection.theAccess}").value; if ("" == accessVal) { alert("The File Access field is required."); return false; } var folderVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileFolderSection.theFolder}").value; if ("" == folderVal) { alert("The Folder field is required."); return false; } }

 

 

and added this call:

 

 

 <apex:form id="UploadForm" onSubmit="return validateForm()"> 

 

I've tested the javascript function against inputText, inputTextarea, and selectList and it works just fine. I have verified that I am accessing the inputFile field using the same pattern as all other fields and have even compared the actual View Source on the form against the $Component call.

 

How can I make my inputFile field absolute required? I don't want the user to be able to submit the form without specifying a file to upload.

 

TIA,

 

John

 

 

 

 

 

  • June 16, 2009
  • Like
  • 0

The question says it all, really. I have a VF page where I can get the information I need. All of the inputText and inputTextarea fields are directly accessible. I cannot, however, figure out how to get at the selected values in my two selectLists. One selectList is single-select, and the other one is multi-select.

 

I saw a post elsewhere on these boards that said that I needed to add javascript to the onclick event to get at the selected value. This wouldn't work for multi-select anyway, and I cannot believe that there isn't a straightforward way to get at this information.

 

So what is it?

 

TIA,

 

John

  • June 16, 2009
  • Like
  • 0

The question says it all, really. You know how on a standard layout there's the little red help button between the label and the input field, which pops up a tooltip if you hover over it and that field has help text defined for it?

 

Well, I'd like that same functionality on a VF page. There's a spot for it between the label and the input field on a pageBlockSectionItem, so can I add the help button in there?

 

And if so, how?

 

TIA,

 

John

  • June 15, 2009
  • Like
  • 0

This is about as basic a question as you can ask about Sites -- where is it? The on-line help says to go to Setup | Develop | Sites to create a new site -- except I don't have that option.

 

I have checked in my Development org and my Enterprise org, and don't have Sites as an option under Customize, Create, or Develop.

 

What don't I know yet?

 

TIA,

 

John

  • June 11, 2009
  • Like
  • 0

We are working on an application for the AppExchange that needs certain default data to exist either when it gets installed or when it runs for the first time.

 

How can we do this?

 

TIA,

 

John

  • June 09, 2009
  • Like
  • 0

The title says it all, really, but here's more detail:

 

Originally we wanted to make a webservice callout from our custom controller. That's working fine, but SF imposes an arbitrary 100KB limit on the size of any webservice request (or response). So I asked around and discovered that the webservice we need to access also supports HTTP POST requests.

 

So can I make a HTTP POST request from a VF page controller? If so, how?

 

TIA,

 

John

  • June 09, 2009
  • Like
  • 0

I am looking, as usual, for something that might not exist. What I want to do is create a generic VF page using a custom controller that I can call from a custom URL button.

 

I am specifically NOT using a standardController here, because I want to call this same page from layout for any object. Since I am not using a standardController, I cannot use a VF button, so I must therefore use a URL button.

 

Anyway, what I want to do is let my customer override the Delete button. When my customer clicks the Delete button, the current record is deleted AND my page checks for other things that need to be deleted and deletes them, too. Before you ask, I cannot use Apex triggers to do this.

 

So what I want to know is, how can I delete the current record considering that this button may be on ANY object?

 

TIA,

 

John

  • June 05, 2009
  • Like
  • 0

I'm not sure if what I'm trying to do is possible, but it doesn't hurt to ask, right?

 

If you call an S-Control from a custom button on objectName, you can get at the ID for the current object with {!objectName.Id}. What I want to do is create an S-Control that I can use for ANY object. This means that I need a way to get at the current object's ID and, optimally, the current object's object type. I know I can do this with VF using SObject and SObject.get('Id') and Sobject.getSObjectType(), but I can't figure out how to do this with an S-Control, and all of the S-Control documentation seems to have gone missing on the developer wiki.

 

(In case you're wondering, VF seems to have built-in constraints that prevent us from doing what we need to do, so we are exploring other options.)

 

TIA,

 

John

  • June 04, 2009
  • Like
  • 0

Again, I think the answer is "No", but I want to make sure. I want to add a custom VF button to a standard layout. (I want this button to be conditional, and would have used an S-Control if they weren't going away.) I want to add this button to many different standard layouts. I want to use a custom controller with this button and, as far as I can tell by reading the doc, I cannot use a standard controller and a custom controller at the same time. Also from the doc, I am required to use a standard controller.

 

Please note that I want to use the SAME VF button on multiple layouts, including standard and custom objects.

 

Is this possible? And if this is possible, how can I do it?

 

TIA,

 

John

  • June 03, 2009
  • Like
  • 0

I think the answer is "No" but I wanted to make sure before I explored other options. I want to embed a VF "page" on a standard layout in the same way that I used to embed S-Controls on a standard layout.

 

TIA,

 

John

  • June 02, 2009
  • Like
  • 0
If we use the Force.com for Google App engine (http://developer.force.com/appengine) for an application on the AppExchange, does that count as a native or non-native application, assuming that all other elements are definitely native? 

TIA,

 

John

  • May 29, 2009
  • Like
  • 0

I have an S-Control that is failing. Assuming that my query is this:

 

SELECT id, lastname, contact.account.name FROM contact, contact.account

 

and that I have already gotten access to the id and lastname fields using contacts = queryResult.getArray('records'); and id = contacst[i].Id, how do I access the contact.account.name field? I assumed that contacts[i].Account.Name would do it, but of course it doesn't.

 

TIA,

 

John

 

 

 

 

 

 

  • August 05, 2009
  • Like
  • 0

Here's what we need to do: We need to add some special logic to a standard layout. We want to replace a standard layout field with a VF "page" that will encapsulate the special logic. (The user shouldn't be aware that anything is different.) I understand how to create the VF page but I cannot figure out how to style the label and field to look like the standard layout. If I do the standard thing:

 

<apex:pageBlock ...> <apex:form ...> <apex:pageSection ...> <apex:pageSectionItem ...> <apex:outputLabel ...> <apex:inputField ...>

 

 

 

I get a nicely formatted label and field, but the whole thing is wrapped up in the page block styling. I just want the label and field, but it should look exactly the same as the rest of the layout. How can I do this?

 

Secondary question: If I do this, and there is a form embedded inside the standard layout, will the page be saved correctly?

 

TIA,

 

John

  • August 03, 2009
  • Like
  • 0

I just discovered that the last guy created two packages in my dev org, one Application Name and one Application Name - OLD. These aren't two VERSIONS of the application but rather two PACKAGES for the application. Obviously, Application Name - OLD has been deprecated and only Application Name is now available on the AppExchange.

 

My question is, can my customer who has already installed Application Name - OLD upgrade cleanly to Application Name?

 

TIA,

 

John

  • June 18, 2009
  • Like
  • 0

I've set the attribute to required="true" and as far as I can tell it has not effect at all.

 

I added an onsubmit javascript function:

 

function validateForm() { var fileVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileNameSection.theFile}").value; if ("" == fileVal) { alert("The File Name field is required."); return false; } var accessVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileAccessSection.theAccess}").value; if ("" == accessVal) { alert("The File Access field is required."); return false; } var folderVal = document.getElementById("{!$Component.UploadForm.firstBlock.requiredElements.fileFolderSection.theFolder}").value; if ("" == folderVal) { alert("The Folder field is required."); return false; } }

 

 

and added this call:

 

 

 <apex:form id="UploadForm" onSubmit="return validateForm()"> 

 

I've tested the javascript function against inputText, inputTextarea, and selectList and it works just fine. I have verified that I am accessing the inputFile field using the same pattern as all other fields and have even compared the actual View Source on the form against the $Component call.

 

How can I make my inputFile field absolute required? I don't want the user to be able to submit the form without specifying a file to upload.

 

TIA,

 

John

 

 

 

 

 

  • June 16, 2009
  • Like
  • 0

The question says it all, really. I have a VF page where I can get the information I need. All of the inputText and inputTextarea fields are directly accessible. I cannot, however, figure out how to get at the selected values in my two selectLists. One selectList is single-select, and the other one is multi-select.

 

I saw a post elsewhere on these boards that said that I needed to add javascript to the onclick event to get at the selected value. This wouldn't work for multi-select anyway, and I cannot believe that there isn't a straightforward way to get at this information.

 

So what is it?

 

TIA,

 

John

  • June 16, 2009
  • Like
  • 0

The question says it all, really. You know how on a standard layout there's the little red help button between the label and the input field, which pops up a tooltip if you hover over it and that field has help text defined for it?

 

Well, I'd like that same functionality on a VF page. There's a spot for it between the label and the input field on a pageBlockSectionItem, so can I add the help button in there?

 

And if so, how?

 

TIA,

 

John

  • June 15, 2009
  • Like
  • 0

This is about as basic a question as you can ask about Sites -- where is it? The on-line help says to go to Setup | Develop | Sites to create a new site -- except I don't have that option.

 

I have checked in my Development org and my Enterprise org, and don't have Sites as an option under Customize, Create, or Develop.

 

What don't I know yet?

 

TIA,

 

John

  • June 11, 2009
  • Like
  • 0

We are working on an application for the AppExchange that needs certain default data to exist either when it gets installed or when it runs for the first time.

 

How can we do this?

 

TIA,

 

John

  • June 09, 2009
  • Like
  • 0

I'm tring to create a custom button and custom link to open a Visualforce page, and have tried both:

 

/apex/pageName?param=value&otherparam=value2

/apex/nameSpace__pageName?param=value&otherparam=value2

 

Once packaged and deployed, I'm getting errors about the page not being found.  I've read suggestions that using URLFOR() with $Page.pageName is the correct way to do this, but I can't find any examples of using URLFOR with $Page and querystring parameters.

  • June 04, 2009
  • Like
  • 0

Again, I think the answer is "No", but I want to make sure. I want to add a custom VF button to a standard layout. (I want this button to be conditional, and would have used an S-Control if they weren't going away.) I want to add this button to many different standard layouts. I want to use a custom controller with this button and, as far as I can tell by reading the doc, I cannot use a standard controller and a custom controller at the same time. Also from the doc, I am required to use a standard controller.

 

Please note that I want to use the SAME VF button on multiple layouts, including standard and custom objects.

 

Is this possible? And if this is possible, how can I do it?

 

TIA,

 

John

  • June 03, 2009
  • Like
  • 0

I think the answer is "No" but I wanted to make sure before I explored other options. I want to embed a VF "page" on a standard layout in the same way that I used to embed S-Controls on a standard layout.

 

TIA,

 

John

  • June 02, 2009
  • Like
  • 0

Working on a new webservice, and when I generate the WSDL, it looks like the enterprise WSDL, rather than the WSDL I generated from the last webservice, which was very very similar to the new one. I've gone over everything that I can think of and the only critical difference between these two webservices is that the new one was developed against an Enterprise org using Eclipse and the old one was developed against a development org using the SF IDE.

 

Since the WSDL is different, my code doesn't work any more.

 

What don't I know yet? 

 

TIA,

 

John

  • May 20, 2009
  • Like
  • 0

Salesforce Content looks like a great new feature for SF. The on-line help says that it is only available for Unlimited, Enterprise, and Professional editions. This implies a few things that I'd like to confirm:

 

1. Since Content is not available in a development org, does that mean we cannot develop applications using Content?

2. Does that mean we cannot include Content functionality at all in an AppExchange app?

3. Is there an API to access Content?

4. Where is Content stored? Is it in the SF database or "in the cloud" and, if it is in the cloud, can I access Content directly (via API) or do I have to go through the SF interface?

5. What limits are there on Content? The training slide said there were limits, but didn't define what they are.

 

TIA,

 

John

  • May 19, 2009
  • Like
  • 0