• CraigH
  • NEWBIE
  • 10 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 16
    Replies
Has anybody noticed slow performance the last couple of days with salesforce?

i.e. on orgs on na7, na12, na11 its taking 5-10 seconds for the setup page to load vs 1-2 seconds on na15


 

I have a very basic VF page that is served up in sites:

 

http://testing4-developer-edition.na15.force.com/online/test

 

 

When running in IE 9 / Win 7, no issues in that it it renders with Document mode: IE9 standards

 

When running in IE10 / Win 8, it is being forced to IE7 standards (the browser is not set to run in compatability mode and the site is not set as a site to run in compatability view).

 

Any ideas on why this is happening?

 

 

<apex:page doctype="html-5.0" title="test"  cache="false" showHeader="false" sidebar="false" >
 <title>test</title>
 <body>
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
  </body>
</apex:page>
  • February 05, 2013
  • Like
  • 0

Does anybody know if there is a way to have Eclipse find an entry in the navigator based on highlighted text.

 

i.e. say I am viewing the source for a VF page which looks something like this:

 

<apex:page controller="MyPageController" sidebar="false" showHeader="false>


......

 

 

I would like to be able to look at the source for the controller.  Is there a way to highlight myPageController in the editor for the page and have Eclipse find the entry in the Navigator or open up the source code for the controller?  

 

With a large project (100+ classes), its time consuming to have to visually find it in the navigator each time.

 

  • August 19, 2012
  • Like
  • 0

Does anybody know how I can total a count of the summarized groups in a report.

 

i.e. Say I have an object model like

 

Parent object

Child object (look up relationship to parent)

 

and Data like

 

Parent 1

Child A

Child B

Parent 2

Child C

Child D

Parent 3

 

I then do a report based on the Child object and group by the lookup field to parent

 

Using recordCount, I can get the total # of records on the report (i.e. 4)

 

What I would like is to see the total of all Parent objects (with children) - in the example above 2

 

 

Has something changed with the attachment behaviour on acitivites on custom objects?

 

Used to be that if you added an attachment to an activity, it would show in the attachment related list for the activity as well as the attachment related list for the object the activity was related to.  Now it seems like it only shows in the attachment related list for the activity.

 

 

Has anybody been running into DNS lookup errors for custom visualforce pages lately on na7?

 

I have been doing some testing:

 

-if I create a custom visualforce page on a DE org on na7, when you view the page the domain name it tries to lookup gets pre-pended by 'c' or the managed package namespace if there is one.  i.e. c.na7.visual.force.com/apex/....

 

I can consistently get a server not found error when first trying to access this page.  Hitting the refresh button a couple of times will eventually cause the page to load.

 

-if I try the same scenario on a DE org on na12, I do not get this error

 

Yes, I know all fingers would point to the local ISP DNS, but still...

  • August 08, 2011
  • Like
  • 0

Is there a way to have a VF page call a controller method after the page loads (i.e. similar in concept to the action attribute only that it executes after the page has displayed).

 

i.e. if the controller method takes a while to run, I'd like to have something show on the VF page indicating to please wait while the code is running.

 

 

Does anybody know if there is a way to setup a user profile so it cannot view any user records?

 

i.e. if you create a new profile & de-select all object level access rights, users with that profile can still search & view all user records in the org.

 

Is there a way to prevent this?

  • August 03, 2010
  • Like
  • 0

I have the following situation.

 

I created a custom object with a custom field (with required set to true) + had this field on a page layout.  The field name is 'age'

 

I then released in a managed package

 

 

At a later date, requirements changed so I needed to split out the age field to save men's and women's age separately.  So I added 2 new custom fields ('mens age' and 'womens age').  

 

Now, I realize that since this object is in a managed package, I cannot delete the original age field nor can I uncheck the required.  So I set the default value of the field to 0 hoping I can just have it save with an arbitrary value since I don't use the field anymore.

 

However, if I goto the page layout I cannot remove or hide the original 'age' field since it is marked as required.

 

Any ideas on how I can get around this so from a user point of view they will not see the obsolete 'age' field on any screens?

Hi

 

I am trying to access an image file in a static resource archive:

 

 

<apex:page >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
{!URLFOR(!$Resource.test2, 'simmlogo.gif')}
<!-- End Default Content REMOVE THIS -->
</apex:page>  

 

<apex:page >

<h1>Congratulations</h1>

This is your new Page

 

{!URLFOR(!$Resource.test2, 'simmlogo.gif')}

 

</apex:page>  

 

However, when I try to compile, I get:

 

Error: Incorrect parameter for function not(). Expected Boolean, received Text

 

 

Any ideas on what is wrong??

When you initially deploy a managed package to a new org, for the things that cannot be packaged does anybody have any tips on how to get them setup in the new org (other than manually doing them via the point & click UI in setup)?  ie for items such as:

-time based workflow

-sharing rules

-field history tracking

-page layout assignments

 

Similarly, for things in a package that are not upgradable, how to get any new changes applied to the new org other than manually doing them:

-page layouts

-dashboards

-reports

-email templates

 

I am going through the process of packing an application.  I got it working ok in an unmanaged package.  I am now trying to get it working in a beta managed package.  After packaging and trying to install in a clean DE org, I am having an issue with one of the visualforce pages that does an <apex:include> to another page in the same package:

 

 

<apex:include pageName="AnotherPage"/> 

 

I am guessing it is failing due to a namespace issue.  I read in another thread that there are some potential changes in Summer 10 with respect to packaging & namespaces.

 

Does anybody know how to correctly reference another page an an apex:include so it works ok in Spring 10?

 

Will the issue above be fixed in Summer 10?

 

 

I am using the method documented in various posts to pre-populate default values in a standard page for a custom object.  i.e. I when the user wants to create a new record for the object, I generate this URL in Apex:

 

https://na7.salesforce.com/a0G/e?00NA0000003UhJ8=2010

 

This will open up the standard new screen for a custom object (page name = aOG) and in a year field put in 2010 (field id = 00NA0000003UhJ8)

 

This works fine, however, if I move the code to a new org, the page name and field ID will be different.

 

Does anybody know if there is a way to dynamically figure out the page name for a custom object and a field id for a field so I can programmatically figure out the appropriate URL vs hard coding it)? 

I recently upgraded Eclipse to support Spring 10 / API v18.

 

Now, when I create a new class from Eclipse, it will default the API to v18.

 

What do people generally do about all of the existing v16 classes, triggers, pages they have created?  Would you suggest doing a 1 time upgrade by going to each component and upgrading to the new API.  Or do them one at a time as they get changed over time with on-going development/fixes?

 

In order to upgrade to, is it best to use the salesforce web UI or do it via the metadata XML in eclipse?

  • April 30, 2010
  • Like
  • 0

Is there a way to access the sites domain name in an email template?

 

i.e. I'd like to have a email that is sent on a workflow that will give a link to a sites page.

 

In development, the page would be something like:

 

http://XXX-developer-edition.na7.force.com/mysite/mypage

 

I would like to code the template something like

 

{!siteaddress}/mysite/mypage

 

so when moving to different environments I don't need to edit the tempate.

 

 

 

Or, is there a way to access a static Apex class method in an email template?  This way, I could set the site address in the Apex class so at least if I have many e-mail templates I would only have one place to change it.

  • April 26, 2010
  • Like
  • 0

In the Spring '10 release notes (p128), the following feature is listed: 
 
 
Generic Collection Creations Now Supported
 
As of Spring '10, you can use generic sObjects to create a collection. For example, the following is now possible:
 
Set<Sobject> foo = new Set<Sobject>();
 
 
I tried this in a partner development edition org (on na7.salesforce.com) and it gets rejected when trying to compile in Eclipse.
 
 
Has anybody else been able to get this to work? 
  • February 15, 2010
  • Like
  • 0

Hi,

 

I have a custom object (say 'Project') that has various fields, has child base objects like notes/attachments, activities + has other child custom objects as master-detail relationships (i.e. issues, risks, etc).

 

One of the fields on the Project object is status (i.e. proposed, under work, completed).  

 

I would like it so that when a project status is set to completed, the project & all child objects are made read only.

 

I have tried using record types + making a different page layout that has its fields read only.  Using a workflow, I set the record type that uses this 'read only' page layout when the status is set to completed.  However this has issues in that:

 

-users can still change fields set as read only in the page layout by double-clicking 

-can't seem to not have the 'edit' link appear next to child object entries

-can't seem to hide the new note/attach button

 

Not to mention the added complexities of ensuring record types for each child object are correctly set based on the parent object status change.

 

One other approach I am considering is to use sharing rules:

 

-by default have the project object be private

-have a sharing rule that will grant access to all users in read/write (i.e. if the status of the project is not completed, anybody can read/edit)

 

-upon change of status to completed, have a trigger that will:

>change the owner to a 'admin user' (they will be the only one that can edit it)

>delete existing sharing rule

>add sharing rule to be read only for all users

 

 

I haven't tried to code this so not sure if this will work.

 

Does anybody have any other ideas on how this requirement can be met?

 

 

 

  • February 01, 2010
  • Like
  • 0

I am trying to create an apex managed sharing rule for a custom object where a share to a UserRole is setup.  As a test, I setup a Role, Group, custom object, sharing reason using the force.com UI and then ran this test method:

 

static testMethod void test() { UserRole testRole; Group testGroup; Custom_object__c obj; testGroup = [SELECT id from Group where name='test']; testRole = [SELECT id from UserRole where name='test']; obj = [SELECT id from Custom_object__c LIMIT 1];

 

// This works OK insert new Custom_object__Share(ParentId = obj.id, UserOrGroupId = testGroup.id, rowCause = Custom_object__Share.rowCause.Apex_test_share__c, AccessLevel = 'Edit');

 

 

// This gives an exception

insert new Custom_object__Share(ParentId = obj.id, UserOrGroupId = testRole.id, rowCause = Custom_object__Share.rowCause.Apex_test_share__c, AccessLevel = 'Edit'); }

 

 

When I try this, the share for the testGroup.id works ok, but the attempt to set UserOrGroupId to the testRole.id gives the following exception:

 

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, User/Group ID: id value of incorrect type: 00EA0000000De5gMAC: [UserOrGroupId]

 

 

From the apex reference manual, it seems to indicate you can set the UserOrGroupId to a role:

 

UserOrGroupId The user or group IDs to which you are granting access. A group can be a public group, role, or territory. This field cannot be updated.

 

Does anybody have any ideas what this is not working?

  • January 03, 2010
  • Like
  • 0
Has anybody noticed slow performance the last couple of days with salesforce?

i.e. on orgs on na7, na12, na11 its taking 5-10 seconds for the setup page to load vs 1-2 seconds on na15


Does anybody know how I can total a count of the summarized groups in a report.

 

i.e. Say I have an object model like

 

Parent object

Child object (look up relationship to parent)

 

and Data like

 

Parent 1

Child A

Child B

Parent 2

Child C

Child D

Parent 3

 

I then do a report based on the Child object and group by the lookup field to parent

 

Using recordCount, I can get the total # of records on the report (i.e. 4)

 

What I would like is to see the total of all Parent objects (with children) - in the example above 2

 

 

It was working fine before but the date fields stopped showing the nice popup calendar on sites now..!!!!!!!!!!!!!!!!!! please help???!!!

Does anybody know if there is a way to setup a user profile so it cannot view any user records?

 

i.e. if you create a new profile & de-select all object level access rights, users with that profile can still search & view all user records in the org.

 

Is there a way to prevent this?

  • August 03, 2010
  • Like
  • 0

Hi

 

I am trying to access an image file in a static resource archive:

 

 

<apex:page >
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page
{!URLFOR(!$Resource.test2, 'simmlogo.gif')}
<!-- End Default Content REMOVE THIS -->
</apex:page>  

 

<apex:page >

<h1>Congratulations</h1>

This is your new Page

 

{!URLFOR(!$Resource.test2, 'simmlogo.gif')}

 

</apex:page>  

 

However, when I try to compile, I get:

 

Error: Incorrect parameter for function not(). Expected Boolean, received Text

 

 

Any ideas on what is wrong??

 

I am going through the process of packing an application.  I got it working ok in an unmanaged package.  I am now trying to get it working in a beta managed package.  After packaging and trying to install in a clean DE org, I am having an issue with one of the visualforce pages that does an <apex:include> to another page in the same package:

 

 

<apex:include pageName="AnotherPage"/> 

 

I am guessing it is failing due to a namespace issue.  I read in another thread that there are some potential changes in Summer 10 with respect to packaging & namespaces.

 

Does anybody know how to correctly reference another page an an apex:include so it works ok in Spring 10?

 

Will the issue above be fixed in Summer 10?

 

 

I am using the method documented in various posts to pre-populate default values in a standard page for a custom object.  i.e. I when the user wants to create a new record for the object, I generate this URL in Apex:

 

https://na7.salesforce.com/a0G/e?00NA0000003UhJ8=2010

 

This will open up the standard new screen for a custom object (page name = aOG) and in a year field put in 2010 (field id = 00NA0000003UhJ8)

 

This works fine, however, if I move the code to a new org, the page name and field ID will be different.

 

Does anybody know if there is a way to dynamically figure out the page name for a custom object and a field id for a field so I can programmatically figure out the appropriate URL vs hard coding it)? 

Is there a way to access the sites domain name in an email template?

 

i.e. I'd like to have a email that is sent on a workflow that will give a link to a sites page.

 

In development, the page would be something like:

 

http://XXX-developer-edition.na7.force.com/mysite/mypage

 

I would like to code the template something like

 

{!siteaddress}/mysite/mypage

 

so when moving to different environments I don't need to edit the tempate.

 

 

 

Or, is there a way to access a static Apex class method in an email template?  This way, I could set the site address in the Apex class so at least if I have many e-mail templates I would only have one place to change it.

  • April 26, 2010
  • Like
  • 0

Hi,

 

I have a custom object (say 'Project') that has various fields, has child base objects like notes/attachments, activities + has other child custom objects as master-detail relationships (i.e. issues, risks, etc).

 

One of the fields on the Project object is status (i.e. proposed, under work, completed).  

 

I would like it so that when a project status is set to completed, the project & all child objects are made read only.

 

I have tried using record types + making a different page layout that has its fields read only.  Using a workflow, I set the record type that uses this 'read only' page layout when the status is set to completed.  However this has issues in that:

 

-users can still change fields set as read only in the page layout by double-clicking 

-can't seem to not have the 'edit' link appear next to child object entries

-can't seem to hide the new note/attach button

 

Not to mention the added complexities of ensuring record types for each child object are correctly set based on the parent object status change.

 

One other approach I am considering is to use sharing rules:

 

-by default have the project object be private

-have a sharing rule that will grant access to all users in read/write (i.e. if the status of the project is not completed, anybody can read/edit)

 

-upon change of status to completed, have a trigger that will:

>change the owner to a 'admin user' (they will be the only one that can edit it)

>delete existing sharing rule

>add sharing rule to be read only for all users

 

 

I haven't tried to code this so not sure if this will work.

 

Does anybody have any other ideas on how this requirement can be met?

 

 

 

  • February 01, 2010
  • Like
  • 0

I am trying to create an apex managed sharing rule for a custom object where a share to a UserRole is setup.  As a test, I setup a Role, Group, custom object, sharing reason using the force.com UI and then ran this test method:

 

static testMethod void test() { UserRole testRole; Group testGroup; Custom_object__c obj; testGroup = [SELECT id from Group where name='test']; testRole = [SELECT id from UserRole where name='test']; obj = [SELECT id from Custom_object__c LIMIT 1];

 

// This works OK insert new Custom_object__Share(ParentId = obj.id, UserOrGroupId = testGroup.id, rowCause = Custom_object__Share.rowCause.Apex_test_share__c, AccessLevel = 'Edit');

 

 

// This gives an exception

insert new Custom_object__Share(ParentId = obj.id, UserOrGroupId = testRole.id, rowCause = Custom_object__Share.rowCause.Apex_test_share__c, AccessLevel = 'Edit'); }

 

 

When I try this, the share for the testGroup.id works ok, but the attempt to set UserOrGroupId to the testRole.id gives the following exception:

 

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, User/Group ID: id value of incorrect type: 00EA0000000De5gMAC: [UserOrGroupId]

 

 

From the apex reference manual, it seems to indicate you can set the UserOrGroupId to a role:

 

UserOrGroupId The user or group IDs to which you are granting access. A group can be a public group, role, or territory. This field cannot be updated.

 

Does anybody have any ideas what this is not working?

  • January 03, 2010
  • Like
  • 0