• MoDiggity
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 3
    Replies
I have a very basic query which returns 11 rows with 4 child records

SELECT Id, (Select Id, Period_Deadline__r.Academic_Period__r.Session__c, Period_Deadline__r.Academic_Period__r.Academic_Year__c, Period_Deadline__r.Name, Period_Deadline__r.End_Date_Application__c, Period_Deadline__r.End_Date_New_Application__c, Period_Deadline__r.Start_Date_Application__c FROM App_Deadlines__r) FROM Application_Process__c

I am getting a visualforce remoting response exceeded 15MB from this query.

The Application_Process__c records do contain a lot of data in other fields which are not being queried here.  Is this a salesforce bug which counts the size of fields that I'm not querying in this case?  Is there a workaround?

I have a client live and this has taken them down.  Super urgent :(
Hi there, I have a matrix report that shows number of sales and total sales for each account for each month.  What I'd like to add to that is the percent difference between total sales per month.  so for instance, if march sold $100, and april sold $110, I want to show +10% in april's data.  Is this possible with reporting?  I thought maybe a custom summary formula, but can't figure it out.  any help would be great.  
If you have a communities self registration process set up, you can either let them log in right away by having them supply a password, or have an email sent to them which provides a link that they use to provide a password and log in.

When they receive the email with the link to provide password and log in, I want to be able to customize the change password page that appears to them.  

I have a custom change password page that I use from within the community, but when clicking the link in the activation email, it uses the standard one and I'd like to override it.

Does anybody know how to do that?
So if a user accesses a page in the community that requires authentication, how do I hold onto that URL throughout the login process or the self-registration process so that we can go back to it after logging in?
Is it possible to use the Site.createPortalUser from within a method that is invoked by javascript remoting?  When I try, I get no error, no userId, nothing in the logs, nothing.  Nothing happens.  The example for customizing the self registration process shows it happening in a visualforce environment using apex:form...  Does it not work otherwise?  Does anybody have any experience with this kind of thing?
Is it possible to use the Site.createPortalUser from within a method that is invoked by javascript remoting?  When I try, I get no error, no userId, nothing in the logs, nothing.  Nothing happens.  The example for customizing the self registration process shows it happening in a visualforce environment using apex:form...  Does it not work otherwise?  Does anybody have any experience with this kind of thing?
Is this something that can be done?  Or do you have to use the standard salesforce tabs approach / all custom if you want to put your own VF pages into a community?
I have in my code: ConnectApi.ChatterMessages.sendMessage('Hello World', '[portal user id]');

But it fails saying "Invalid user identifiers"

This is a community user.  Does that mean they can't receive direct chatter messages? This same piece of code works fine for internal users.
Everything I read just says:  Give the owner a role.  However, I want to know which role!  I want to understand WHY the account owner needs to be part of the role heirarchy.  This isn't clear to me.  It's probably some simple salesforce security reason, but can somebody please explain this and how it affects the community users themselves?  I want my community users to be able to self-register.  
How come the variable is not visible?  It seems like the { set; } doesn't do anything without the presence of get; in that block.  Here's the code.

global with sharing class AppTrackerController {
                 
    public boolean accessError { set; }

    global AppTrackerController(ApexPages.StandardController stdController) 
    {
        accessError = false;
    }

}


Hi There,

When setting up a profile, there is a checkbox labeled "Manage Public Templates".  This controls access to email templates.  When set to true, the user has access to modify read-only email folders, and edit and add templates to those folders.

I have an VF page that allows users to add, edit, and delete email templates.  Within apex, users who shouldn't be allowed to, are able to delete and edit records to which they have no access.

What I need to do is control access programmatically.  However, I cannot figure out how to access the "Manage Public Templates" setting with code.  I am looking in the PermissionSet using the user's profile Id.  I can get all the other settings.

If you're familiar with this object (PermissionSet), you know that each setting has it's own column in the table called permissions[permission name], so for instance:

[select PermissionsEditHtmlTemplates, PermissionsAPIEnabled from PermissionSet where ProfileId = : UserInfo.getProfileId()]

Would give you the settings for the profile of the logged in user.

However, I don't know which of these "settings" corresponds to the "ManagePublicTemplates" setting.

I know for sure that PermissionsEmailTemplateManagement is NOT it.  Neither is PermissionsManageEmailClientConfig.  Neither is PermissionsEditHtmlTemplates.

Any ideas how I can access this setting?  I need to see it in my Apex code.

Thank you.

I'm having trouble with this because the documentation says that the limit is number of sendEmail methods called, but my trigger is bulkified and the method is only called once.

 

Does this error mean that you can only send 10 emails per apex execution?  That sounds nutso.  Here's the code (note: accountIds set was already populated)

 

// Email related vars

Messaging.SingleEmailMessage m;

string messageBody;

Messaging.SingleEmailMessage[] emails = new List<Messaging.SingleEmailMessage>();

 

Account[] accounts = [select id, name, ownerid, owner.email, type from Account where id in :accountIds];

for(Account a : accounts)

{

 if(a.type.startsWith('X') || a.type.startsWith('Pending')) { 

  messageBody = 'The account: "' + a.name + '" with type ' + a.type + ' has closed an opportunity';

  m = new Messaging.SingleEmailMessage();

  m.setHtmlBody(messageBody);

  m.setPlainTextBody(messageBody);

  m.setSubject('Pending or X account ' + a.name + ' has closed an opportunity');

  m.setToAddresses(new list<string>{a.owner.email});

  emails.add(m);

 }

 

 if(a.type == 'Distributor' || a.type == 'Distributor & Customer') {

  a.type = 'Distributor & Customer';

 } else if(a.type == 'Prospect' || a.type == 'Customer' || a.type == 'X Customer') {

  a.type = 'Customer';

 } elseif(a.type == 'CP: Consultant') {

  a.type = 'CP: Consultant & Customer';

 } else {

  a.type = 'Partner & Customer';

 }

}

 

update accounts;

 

Messaging.sendEmail(emails);

 

Does anybody know the real answer?

I have a package that is failing now in orgs where there are > 1000 active users.  This happens when portals are enabled.

 

I can fix this by limiting my query to only grab users that are not portal users.  However, the field IsPortalEnabled on the user object only exists if portals are enabled in my org, it seems.  They are not enabled in my dev org.

 

I want to query on User.ContactId, but can't seem to find any information about whether this can be used for something other than portal users?

 

Also, I could also check to see if portals are enabled in the org, but can't seem to find that either.

 

Any help would be appreciated.

 

Thanks!

Hi There -

 

I'm trying to figure out how to use a visualforce page in place of the multi line item opportunity products page when adding new opportunity products.  Here's the flow I want:

 

Looking at an opportunity -> Looking at the products for that opportunity -> Click: Add Products -> It brings up the list of products and you can search and select more than one -> Click: Select -> You see my visualforce page where I can use apex to control what is seen on this screen.

 

I see where I can override the "Edit All Products" which is the same screen to edit rather than add, but overriding that doesn't override the screen when I am adding them initially.  Is this something that salesforce can't support?  I'm awfully confused as this seems like it should be possible.

Is this something that can be done?  Or do you have to use the standard salesforce tabs approach / all custom if you want to put your own VF pages into a community?
I have in my code: ConnectApi.ChatterMessages.sendMessage('Hello World', '[portal user id]');

But it fails saying "Invalid user identifiers"

This is a community user.  Does that mean they can't receive direct chatter messages? This same piece of code works fine for internal users.
How come the variable is not visible?  It seems like the { set; } doesn't do anything without the presence of get; in that block.  Here's the code.

global with sharing class AppTrackerController {
                 
    public boolean accessError { set; }

    global AppTrackerController(ApexPages.StandardController stdController) 
    {
        accessError = false;
    }

}


Hi There,

When setting up a profile, there is a checkbox labeled "Manage Public Templates".  This controls access to email templates.  When set to true, the user has access to modify read-only email folders, and edit and add templates to those folders.

I have an VF page that allows users to add, edit, and delete email templates.  Within apex, users who shouldn't be allowed to, are able to delete and edit records to which they have no access.

What I need to do is control access programmatically.  However, I cannot figure out how to access the "Manage Public Templates" setting with code.  I am looking in the PermissionSet using the user's profile Id.  I can get all the other settings.

If you're familiar with this object (PermissionSet), you know that each setting has it's own column in the table called permissions[permission name], so for instance:

[select PermissionsEditHtmlTemplates, PermissionsAPIEnabled from PermissionSet where ProfileId = : UserInfo.getProfileId()]

Would give you the settings for the profile of the logged in user.

However, I don't know which of these "settings" corresponds to the "ManagePublicTemplates" setting.

I know for sure that PermissionsEmailTemplateManagement is NOT it.  Neither is PermissionsManageEmailClientConfig.  Neither is PermissionsEditHtmlTemplates.

Any ideas how I can access this setting?  I need to see it in my Apex code.

Thank you.

Hi There -

 

I'm trying to figure out how to use a visualforce page in place of the multi line item opportunity products page when adding new opportunity products.  Here's the flow I want:

 

Looking at an opportunity -> Looking at the products for that opportunity -> Click: Add Products -> It brings up the list of products and you can search and select more than one -> Click: Select -> You see my visualforce page where I can use apex to control what is seen on this screen.

 

I see where I can override the "Edit All Products" which is the same screen to edit rather than add, but overriding that doesn't override the screen when I am adding them initially.  Is this something that salesforce can't support?  I'm awfully confused as this seems like it should be possible.