• jiforce
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I have 2 Account Assignment Rules Defined in This Territory
if I active both of them, there will be no account assigned to the territory.
if I active only 1 of them, it works fine.
the rule is very simple. just city code equels certain number (there are a lot of numbers in one territory and no rules, so it needs to be added 1 by 1)
it seems one territory only accepts one rule....
But I want to run multiple rules in one territory without creating child territory. Does anyone know how to do it?

I have written an apex email function by using Messaging.SingleEmailMessage class.

 

We have translated system into Japanese and the end user system is in Japanese; however, the subject of sent email shows ???? question mark which doesn't display properly. The email body does display properly.

 

Any idea how to encode email subject and make it display properly?

 

Thanks!

HI everyone,

We are trying to create our own file upload Lightning component.
We based our approach on what Peter Knolle did:
http://peterknolle.com/file-upload-lightning-component/

(Quick summary: we upload the fill in chunks and update the Attachment body with DML because we cannot pass a String of size bigger than 6 000 000)

Our problem is that line:
a.Body = EncodingUtil.base64Decode(EncodingUtil.base64Encode(a.Body)+ base64Data);
It seems to load the existing body twice in memory, once for a.Body and once for EncodingUtil.base64Decode(...) which makes the biggest file we can upload only around 1.5MB because of the Heap Size limit.

I tried using "transient" variables to try and unload memory. 
I also tried setting some variable to null or "" after using them but the Heap Size usage stays the same.
No luck.

Any idea?

Cheers,
Laurent

1) I am trying again to get selected rows (with getSelected() on the controller) from an Enhanced list view in a VF page. Am I doing something wrong or is it just not possible to pass the EnhancedList records to a custom controller? It seems that the Enhanced list recordset should be bound to the controller records but I cannot figure out where this should happen.

 

2) BTW, I also try to change the FilterID in the EnhancedList but it does not refresh properly. Is this a known issue?

 

Here is the code. Any help would be great.

<apex:page standardController="Contact" extensions="pgContactHomeController" showHeader="true" tabStyle="Contact" recordSetVar="myContacts">

	<apex:form >
        <apex:selectList value="{!FilterID}" size="1">
            <apex:actionSupport event="onchange" rerender="listPanel"/>
            <apex:selectOptions value="{!listviewoptions}"/>
        </apex:selectList>
    </apex:form>
    
	<apex:outputPanel layout="block" id="listPanel">
		<apex:enhancedList height="300" ListId="{!FilterID}" rowsPerPage="10" id="ContactList" customizable="True"  reRender="debugPanel"/>
	</apex:outputPanel>    

	<apex:outputPanel layout="block" id="debugPanel">
    	<apex:pageblock id="myBlock">
	  		<apex:outputText value="Records={!recordCount}" /> <br/>
			<apex:outputText value="Selected={!selectedCount}" /> <br/>
			<apex:outputText value="FilterID={!FilterID}" /> <br/>
		</apex:pageblock>
	</apex:outputPanel>
	
</apex:page>
public with sharing class pgContactHomeController {
    private ApexPages.StandardSetController myController;
    public pgContactHomeController(ApexPages.StandardSetController stdController) {
     this.myController = stdController;
    }
public Integer getRecordCount(){
return ((List<Contact>)myController.getRecords()).size();
}
public Integer getSelectedCount(){
return ((List<Contact>)myController.getSelected()).size();
}
public Id getFilterID(){
return (myController.getFilterID());
}
public void setFilterID(ID newID){
myController.setFilterID(newID);
return;
}
}

 

 

 

  • March 04, 2011
  • Like
  • 0
I have 2 Account Assignment Rules Defined in This Territory
if I active both of them, there will be no account assigned to the territory.
if I active only 1 of them, it works fine.
the rule is very simple. just city code equels certain number (there are a lot of numbers in one territory and no rules, so it needs to be added 1 by 1)
it seems one territory only accepts one rule....
But I want to run multiple rules in one territory without creating child territory. Does anyone know how to do it?

Hi,

 

Quick question, the answer to which I am guessing is currently no but someday yes:

 

<apex:inputField value="{!Contact.Name}"/> <!-- Static -->

 

<apex:inputField value="{!Contact.get('Name')}"/> <!-- Dynamic -->

 

Is there anyway currently to do something like the Dynamic example above, so that the field my be varied at runtime?

 

It would certainly make my life a whole lot easier... 

 

Thanks a lot,

Mike