• Nickname7
  • NEWBIE
  • 30 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 14
    Replies
I'm working on a custom tab that will show in Salesforce1 app. I wrote my own custom Visualforce page but I would like to create a search box in the Salesforce1 header as suggested in style guide. 
 Salesforce1 Header Search

My question is:
1. Is there a way to put my own search box to the header in my own Visualforce page?
2. Is there a way to display back button instead of a menu item as my Visualforce page does partial refreshes of the page and I would like the user to be able to go back using that button?

Thanks!

Hi,

 

When I try to install an app from appexchange and select sandbox as my destination org, it would not put me into the right location. Is there a problem with the AppExchange?

 

Thanks!

Hi,

 

Is there a way to remove the search box in the header? I need to provide my own search feature and ideally I can keep the search box but make it return the search results in the format I want it to look. Is there a way to do this?

 

Thanks!

We need to build an all custom Visualforce application that should not display the tabed header that also includes the logo, the setup menu, app dropdown as well as the tabs.

 

We can easily remove these by setting showHeader="false" in the VF page. However, once you get into a page that does not have any of those options, how do you navigate your admin users to the Setup menu or how do you log users out?

 

There are very nice example custom Force.com applications showcased but I don't know if they are practical apps or they are just for demo purposes and these critical details are missing. Any input will help.

Hi,

 

I would like to setup a link in emails to customers so that they can directly login to Customer Portal and redirected to a custom Visualforce page. For example my page URL is as follows:

 

/apex/TestPage?id=12345&name=abcde

 

When the email is sent out, the email should point the user to the customer portal login page first and once the authentication is successful, send the user to the TestPage. I'm thinking the URL should be something like:

 

https://na1.salesforce.com/secur/login_portal.jsp?orgId=XXXX&portalId=YYYY&StartURL=/apex/TestPage?id=12345&name=abcde

 

Is it possible to do this? 

 

Thanks!

Hi,

 

I have an organization that has more than 100 custom objects. I need to loop through these objects and check if the object includes a specific field. As I'm doing this I hit the governor limit of field describes. I don't believe that I'm doing a field describe but it thinks I am. Here is my code that gets executed for each object (sObjectDescribe):

 

Map<String, SObjectField> fieldMap = sObjectDescribe.fields.getMap();
List<SObjectField> fieldValues = fieldMap.values();
for(SObjectField fieldValue:fieldValues)
{ 
String fieldValueStr = String.valueOf(fieldValue);
if (fieldValueStr.endsWith('__Special_Field__c') || fieldValueStr == ('Special_Field__c'))
{
return true;
}
}

 When I look at the documentation it talks about the sObjectDescribe.fields.getMap() call as follows:

 

The value type of this map is not a field describe result. Using the describe results would take too many system resources. Instead, it is a map of tokens that you can use to find the appropriate field. After you determine the field, generate the describe result for it.

 

So, what am I doing wrong here? Is this a bug or documentation bug?

 

Thanks!

 

 

I'm trying to record activity on several different objects for reporting purposes. In order to do this, I can probably have an activity object for each object that needs to be associated with, and also add a relationship between the activity object and the target object. However, this means that I will need to have many objects and many different reports.

 

Instead, can I have a generic "activity" object that will have a generic "objectId" field that is not a relational field but it can refer to object A, object B etc. ?At the same time, I will also have to store a "type" field on my activity to store if the activity is for object A or object B, etc.

 

I can build custom apex classes and visualforce stuff to properly populate these activity objects, however, can I use the standard reporting features of SFDC? Am I cornering myself with this approach?

 

Any input will be appreciated!

We have a VF page that is used to override the View for the Account object. When we setup the Console view and open the details of an account, the page is displayed properly. However, when we click on a related object in the account detail (such as Account Cases), then the right side does not show up. Firebug shows the following javascript error:

 

 

Permission denied for <https://namespace.na7.visual.force.com>

to get property Window.srcFromMain from <https://na7.salesforce.com>.
[Break on this error] if (window.parent && window.parent.srcFromMain) {

 

 

This javascript function is in desktopMain.js:

function srcUp(url) {
if (window.parent && window.parent.srcFromMain) {
window.parent.srcFromMain(url);
 } else {
 srcSelf(url);
 }

 

 

 

It seems that the VF page is in a different domain then the frame set and this is causing a security issue with the javascript. Is there a workaround or solution for this issue?

Hi,

 

I am trying to apply push upgrades for my managed package.

But when I try to push upgrades by selecting target releases. My all test cases are failing.

 

For example I have a major release with 1.10. Then I created a fix release for 1.10.1. Everthing is fine till this point.

Then I am going and trying to schedule a new push upgrage.

 

It is failing with saying:

Insufficient Privileges

System.QueryException: List has no rows for assignment to SObject etc.

 

None of these errors happen when i manually upgrade.

  

What might be the reason? Do I need to set another option?

 

Thanks...

Hi,

 

I have a pretty simple custom component that is in a managed package and deployed to an organization that has no namespace. In this case, Salesforce seem to be having an issue resolving the correct namespace. Here is the simplest way of reproducing the issue:

 

1, First create a custom page that will be the target of our button that is in our custom component:

 

<apex:page >
  <h1>Target Page</h1>
</apex:page>

 

 

2. Create a custom controller called TestController:

 

global with sharing class TestController
{

    public TestController()
    {

    }
    
    public PageReference goToNextPage()
    {
    
        return Page.test__TestNextPage__c;
    }
    
    static testMethod void runTestCases()
    {
        TestController t = new TestController();
        system.assertEquals(t.goToNextPage().getUrl(), Page.test__TestNextPage__c.getUrl());
    }   
}

 3. Now create a custom component that will use the above controller:

 

<apex:component controller="TestController" allowDML="true" access="global">
 
 <h1>Test componet</h1>
 <apex:form >
     <apex:pageBlock id="testBlock" title="Test Block" rendered="true">
     
         <apex:pageBlockButtons location="top">
            <apex:commandButton action="{!goToNextPage}" rendered="true" value="Go To Next Page" disabled="false" />
         </apex:pageBlockButtons>
     
     </apex:pageBlock>
 </apex:form>
</apex:component>

4. Now package this up as a managed package and deploy it into an ORG that has no namespace defined.

5. In the new ORG, create a new custom visualforce page that will use the packaged test component:

 

 

<apex:page >
  <h1>Test Page</h1>
 
  <test:TestComponent id="testComponent" rendered="true" />
</apex:page>

6. Now when you navigate to the page, and click on the "Go To Next Page" button you get the following error:

 

URL No Longer Exists

If you then add a namespace to the same ORG, the button starts working. Any ideas, suggestions?

 

Thanks!

 

 

 

 

    

Hi,

I know there are multiple posts related to this exception and I've gone through them, but I can't seem to find a solution.

I am trying to call a custom web service provided to us by a customer. We used a Partner WSDL previously for making other 'describeObject' type calls to the API. But now, we need to call the web service method exposed by the customer's WSDL. I added the custom WSDL as a web reference on my project.

I'm able to get the session id and server url by calling the sForceService.login(username, password) method. But the subsequent call to the customer's web service method fails with an 'Invalid SessionId' exception. Customer's account is a Sandbox account.

Here is the code:

//_sforceService: Salesforce Partner WSDL reference.

_sForceService = new SforceService();
_sForceService.Url = "https://test.salesforce.com/services/Soap/u/28.0";  //Is this correct? if I don't assign this, the login fails
_loginResult = _sForceService.login("username", "Password+security token");

//ucGuideBook.GIA_ServiceService is Customer's webservice.
ucGuideBook.GIA_ServiceService ucGIAService = new GIA_ServiceService();
ucGIAService.SessionHeaderValue = new ucGuideBook.SessionHeader();
ucGIAService.SessionHeaderValue.sessionId = _loginResult.sessionId;

//This call fails:
string ucGuideBook = ucGIAService.getGuidebookXml("AccountId");

Exception:

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key:

It seems like it's going to a different Sandbox than the one that has the active session. It might have something to do with the WSDL endpoint, I'm not sure. The WSDL end point is: https://cs2.salesforce.com/services/Soap/class/ClassName.

The serverUrl that is returned from the .login() method: "https://mysandbox.cs13.my.salesforce.com/services/Soap/u/28.0/OrgId" . I tried changing the wsdl end point to be cs13, but that didn't help.

I looked at existing forum answers, and ensured this setting was off - "Lock sessions to the IP addresses from which they originated" (doesn't make a difference whether it is ON or OFF), and could not find anything else relevant.

Any help would be greatly appreciated.

 

Hi,

 

I am developing a mobile app and using the REST API to interface with Salesforce.

One of our customer data sets has a huge "bulge" of notes so big that I cannot even

issue a Count() query on it.

 

This seems really odd, not to even be able to count the items in a Table.  If this were

an actual query to pull records, I would try to narrow the query.  But having to narrow

a Count() query seems like there is some deeper fundamental problem (especially

for such a small value as 20000 records).

 

Unfortunately, I don't have easy access to the customer's account to experiment with.

Any suggestions appreciated.  [I would love a "cold call" from a salesforce support

engineer for this one.]

 

Thanks,

Tom

 

Here is the failure:

 

SOQL "select Count() from Note"

 

==>

 

{

    "message" : "exceeded 20000 distinct ids",

    "errorCode" : "OPERATION_TOO_LARGE"

}

 

  • July 27, 2012
  • Like
  • 0

Hi,

 

When I try to install an app from appexchange and select sandbox as my destination org, it would not put me into the right location. Is there a problem with the AppExchange?

 

Thanks!

Hi,

 

Is there a way to remove the search box in the header? I need to provide my own search feature and ideally I can keep the search box but make it return the search results in the format I want it to look. Is there a way to do this?

 

Thanks!

We need to build an all custom Visualforce application that should not display the tabed header that also includes the logo, the setup menu, app dropdown as well as the tabs.

 

We can easily remove these by setting showHeader="false" in the VF page. However, once you get into a page that does not have any of those options, how do you navigate your admin users to the Setup menu or how do you log users out?

 

There are very nice example custom Force.com applications showcased but I don't know if they are practical apps or they are just for demo purposes and these critical details are missing. Any input will help.

Hi,

 

I have an organization that has more than 100 custom objects. I need to loop through these objects and check if the object includes a specific field. As I'm doing this I hit the governor limit of field describes. I don't believe that I'm doing a field describe but it thinks I am. Here is my code that gets executed for each object (sObjectDescribe):

 

Map<String, SObjectField> fieldMap = sObjectDescribe.fields.getMap();
List<SObjectField> fieldValues = fieldMap.values();
for(SObjectField fieldValue:fieldValues)
{ 
String fieldValueStr = String.valueOf(fieldValue);
if (fieldValueStr.endsWith('__Special_Field__c') || fieldValueStr == ('Special_Field__c'))
{
return true;
}
}

 When I look at the documentation it talks about the sObjectDescribe.fields.getMap() call as follows:

 

The value type of this map is not a field describe result. Using the describe results would take too many system resources. Instead, it is a map of tokens that you can use to find the appropriate field. After you determine the field, generate the describe result for it.

 

So, what am I doing wrong here? Is this a bug or documentation bug?

 

Thanks!

 

 

Hi, I'm trying out field sets and I'm having a little trouble. I added a field set to an object in a managed package, used the field set in a visualforce page, then installed the package in a test org. The page works great and includes the fields that I expected. I can remove fields from the page at will.

 

If I then add a new custom field to the managed object in the test org, and then add that field to the field set, the page no longer works. I get an "Insufficient Privileges" error. I've checked the FLS for the new field, added it to the "Standard Fields" field set (whatever that is), added it to the layout, and used an admin login with view all, and I still get the insufficient privileges.

 

Is there something else that needs to happen for a customer-added field to be added to a field set that is used in visualforce from a managed package? Am I holding it wrong?

 

Thanks in advance for any tips!

  • February 23, 2011
  • Like
  • 0

We have a VF page that is used to override the View for the Account object. When we setup the Console view and open the details of an account, the page is displayed properly. However, when we click on a related object in the account detail (such as Account Cases), then the right side does not show up. Firebug shows the following javascript error:

 

 

Permission denied for <https://namespace.na7.visual.force.com>

to get property Window.srcFromMain from <https://na7.salesforce.com>.
[Break on this error] if (window.parent && window.parent.srcFromMain) {

 

 

This javascript function is in desktopMain.js:

function srcUp(url) {
if (window.parent && window.parent.srcFromMain) {
window.parent.srcFromMain(url);
 } else {
 srcSelf(url);
 }

 

 

 

It seems that the VF page is in a different domain then the frame set and this is causing a security issue with the javascript. Is there a workaround or solution for this issue?

Hi,

 

I am trying to apply push upgrades for my managed package.

But when I try to push upgrades by selecting target releases. My all test cases are failing.

 

For example I have a major release with 1.10. Then I created a fix release for 1.10.1. Everthing is fine till this point.

Then I am going and trying to schedule a new push upgrage.

 

It is failing with saying:

Insufficient Privileges

System.QueryException: List has no rows for assignment to SObject etc.

 

None of these errors happen when i manually upgrade.

  

What might be the reason? Do I need to set another option?

 

Thanks...

Hi,

 

I have a pretty simple custom component that is in a managed package and deployed to an organization that has no namespace. In this case, Salesforce seem to be having an issue resolving the correct namespace. Here is the simplest way of reproducing the issue:

 

1, First create a custom page that will be the target of our button that is in our custom component:

 

<apex:page >
  <h1>Target Page</h1>
</apex:page>

 

 

2. Create a custom controller called TestController:

 

global with sharing class TestController
{

    public TestController()
    {

    }
    
    public PageReference goToNextPage()
    {
    
        return Page.test__TestNextPage__c;
    }
    
    static testMethod void runTestCases()
    {
        TestController t = new TestController();
        system.assertEquals(t.goToNextPage().getUrl(), Page.test__TestNextPage__c.getUrl());
    }   
}

 3. Now create a custom component that will use the above controller:

 

<apex:component controller="TestController" allowDML="true" access="global">
 
 <h1>Test componet</h1>
 <apex:form >
     <apex:pageBlock id="testBlock" title="Test Block" rendered="true">
     
         <apex:pageBlockButtons location="top">
            <apex:commandButton action="{!goToNextPage}" rendered="true" value="Go To Next Page" disabled="false" />
         </apex:pageBlockButtons>
     
     </apex:pageBlock>
 </apex:form>
</apex:component>

4. Now package this up as a managed package and deploy it into an ORG that has no namespace defined.

5. In the new ORG, create a new custom visualforce page that will use the packaged test component:

 

 

<apex:page >
  <h1>Test Page</h1>
 
  <test:TestComponent id="testComponent" rendered="true" />
</apex:page>

6. Now when you navigate to the page, and click on the "Go To Next Page" button you get the following error:

 

URL No Longer Exists

If you then add a namespace to the same ORG, the button starts working. Any ideas, suggestions?

 

Thanks!

 

 

 

 

I have a component that accepts a Boolean attribute. Certain combinations of inline functions generate the error message shown in the subject line. See code below for details:

 

<!-- this produces the error --> <c:myComponent myBooleanValue="{!LEN(myObj__c.myField__c) == 0}" .../> <!-- this produces the error --> <c:myComponent myBooleanValue="{!LEN(myObj__c.myField__c) = 0}" .../> <!-- this works! --> <c:myComponent myBooleanValue="{!NOT(LEN(myObj__c.myField__c) > 0)}" .../>

 

Obviously I have a workaround (the last example) but I'm curious to know why the other two do not work.

Hello,

I put an override on the "View" link for one of my custom objects. I'm sending people to a custom Visualforce page when they choose to View a record from a list view. I am trying to re-create the record detail page in Visualforce and want to put a "Back to List: [Object Name]" link right under the sectionHeader - just like you would see on a standard record detail page. I think you can do this using the "apex:commandLink" component, but cannot figure out what the correct syntax is. Does anyone know how to do this in Visualforce?

Thanks,

Rob
Hello, I am trying to add multiple listeners to my office's main project. It's using Spring 2.5 framework deployed on a JBoss 4.2.3 server using Java 6. I tried adding Spring on top of the Dynamic Project in MyEclipse that the tutorial in the wiki describes. The listener works fine, but my attempts to add Spring ended up with deployment errors or exceptions being thrown in the web services explorer when any type of injection or bean factory was instantiated, then complete halts in some imported class while running the debugger with no exceptions thrown.  I am currently trying to add the web services to a web project in MyEclipse. I tried having the code generated by the WSDLs in different packages and the same autogenerated packages, with different method names based on the 'Notification' method in the sample WSDLs for each type of sObjects being sent. I also tried having the 'notifications' element type be an XML choice, any, and all for each complexType sObjectNotifications. I also tried having the NotificationPort and NotificationBinding contain multiple opertations based on different sObject messages/notifications. Several of these implementations I've tried in different web projects work successfully when tested in the web services explorer, but either throw a dispatch method not found exception or return null values for the sObjects when a message is received from Sales Force. I am not sure what I'm doing wrong on how to have the listeners in one project, as my lead does not want to have seperate projects for each listener for ease of maintenance purposes. Any help would be appreciated. Thanks
  • September 29, 2008
  • Like
  • 0