• jon85943
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

Hi Everyone,

 

I am wondering if it is possible to display the Parent Territory along with the regular territory on the Account screen.  I added the Territories field but cannot get Parent Territory to display. 

 

Heres an example:

Territory: Boston

Parent Territory: Northeast

 

I can get Boston to show up but cannot seem to get Northeast as another field labeled Parent Territory.

 

Please let me know how I could do this, if its possible.

 

Thanks!

Hi Everyone,

 

I am looking into setting up territories using SF and we are waiting on our Sandbox to be available so I figured I would go ahead and start planning out my territories now.  

 

Here is how our territories are to be setup, we have a list of most of the zip codes in the US with which we want our accounts to be assigned, users will be in charge of accounts based on these territories as well.  Anyways, the file we have has around 42,000 zip codes.  Each of these zip codes rolls up into a territory (52 Territories such as Hartford, Boston, Miami, etc, with an average of around 750 zip codes in each territory) and each of these territories rolls up into a Region (8 regions such as Northeast, Southeast, etc)

 

In summary, we have 3 columns, zip code (42,000 zips), territory (52 territories) and region (8 regions), we want accounts to automatically be assigned to these regions and territories based on the zip codes as well as users to be assigned accounts based on the regions and territories.

 

Is this possible and if so, what would be the best approach?

 

Any input would be greatly appreciated!

 

Thanks

I am relatively new to VF and am having trouble creating a custom picklist.  We created a page layout using VF and wanted to create a Record Type custom picklist, not using the standard picklist functionality.  I can't seem to get the code right, see below.  I have created an extention to try to create the custom list.

 

 

<apex:page standardController="Sharing_ES__c" extensions="RecordTypeExtension">
  <apex:form >
    <apex:sectionHeader title="{!$ObjectType.Sharing_ES__c.label}" subtitle="{!Sharing_ES__c.name}"/>
    <apex:pageBlock title="{!$ObjectType.Sharing_ES__c.label} Detail" mode="edit">
        <apex:pageBlockButtons >
      
            <apex:commandButton action="{!save}" value="Save"/>
            <apex:commandButton action="{!edit}" value="Edit"/>
            <apex:commandButton action="{!delete}" value="Delete"/> 
            
        </apex:pageBlockButtons>
        <apex:pageBlockSection showHeader="false" columns="2">
            <apex:inputField value="{!Sharing_ES__c.Name}"/>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Custom Sharing Owner"/>
                <apex:outputPanel >
                    <apex:inputField value="{!Sharing_ES__c.OwnerId}"/>&nbsp;
                    <apex:outputLink value="{!URLFOR($Action.Sharing_ES__c.ChangeOwner,Sharing_ES__c.id)}">[Change]</apex:outputLink>
                </apex:outputPanel>
            </apex:pageBlockSectionItem>
       
            <apex:inputField value="{!Sharing_ES__c.Sharing_Type__c}"/>
            <apex:inputField value="{!Sharing_ES__c.Account__c}"/>
            <apex:inputField value="{!Sharing_ES__c.Access_Type__c}"/>
            <apex:inputField value="{!Sharing_ES__c.Description__c}"/>
            <apex:inputField value="{!Sharing_ES__c.User__c}"/>
            <apex:inputField value="{!Sharing_ES__c.Group__c}"/>
            <apex:pageBlockSectionItem />


<apex:pageBlockSection columns="1" showHeader="false">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="RecordType" for="rtp"></apex:outputLabel>
                    <apex:selectList id="rtp" value="{!recordtype.id}" size="1" title="RecordType">
                        <apex:selectOptions value="{!rtp}"></apex:selectOptions>
                    </apex:selectList>
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>

        </apex:pageBlockSection>
        <apex:pageBlockSection showHeader="false" columns="2">
            <apex:inputField value="{!Sharing_ES__c.CreatedById}"/>
            <apex:inputField value="{!Sharing_ES__c.LastModifiedById}"/>
        </apex:pageBlockSection>
        <apex:pageBlockSection showHeader="true" title="Custom Links" columns="3"> 
     </apex:pageBlockSection>
    
   </apex:pageBlock>
   </apex:form> 
 </apex:page>

 

 

 

And here is our Extension

 

 

public class RecordTypeExtension {
    private final RecordType r; //RecordType sObject
    
    //initializes the private member variable r by using the getRecord method from the standard controller
    public RecordTypeExtension(ApexPages.StandardController stdController) {
        this.r = (RecordType)stdController.getRecord();
    }
    
    //builds a picklist of Record Types for the SFL5_Project__c object
    public List<selectOption> getRecordType() {
        List<selectOption> options = new List<selectOption>(); //new list for holding all of the picklist options
        options.add(new selectOption('', '- None -')); //add the first option of '- None -' in case the user doesn't want to select a value or in case no values are returned from query below	
        for (RecordType rtp : [SELECT Id, Name FROM RecordType where SobjectType = 'SFL5_Projects__c']) { //query for Record Types
            options.add(new selectOption(rtp.ID, rtp.Name)); //for all records found - add them to the picklist options
        }
        return options; //return the picklist options
    }
}

 Thanks!

 

Hi All,

 

I am having trouble creating an edit page using Visualforce.  We created a visualforce page for a custom object and have assigned this visualforce page for the custom object page layout.  We want to create a visualforce page for the edit function as well but I am having issues creating this.  I think we may need to create a controller extension but I am not sure. Here is the sample code we have for our page layout. All we want is to allow this page layout to be edited using a visualforce page.

 

 

 

<apex:page standardController="Sharing_ES__c">
	<apex:sectionHeader title="{!$ObjectType.Sharing_ES__c.label}" subtitle="{!Sharing_ES__c.name}"/>
	<apex:pageBlock title="{!$ObjectType.Sharing_ES__c.label} Detail">
		<apex:pageBlockButtons >
		<apex:form >
			<apex:commandButton action="{!edit}" value="Edit"/>
			<apex:commandButton action="{!delete}" value="Delete"/>
			<apex:commandButton action="{!URLFOR($Action.Sharing_ES__c.Clone,Sharing_ES__c.id)}" value="Clone"/>
		</apex:form>
		</apex:pageBlockButtons>
		<apex:pageBlockSection showHeader="false" columns="2">
			<apex:outputField value="{!Sharing_ES__c.Name}"/>
			<apex:pageBlockSectionItem >
				<apex:outputLabel value="Custom Sharing Owner"/>
				<apex:outputPanel >
					<apex:outputField value="{!Sharing_ES__c.OwnerId}"/>&nbsp;
					<apex:outputLink value="{!URLFOR($Action.Sharing_ES__c.ChangeOwner,Sharing_ES__c.id)}">[Change]</apex:outputLink>
				</apex:outputPanel>
			</apex:pageBlockSectionItem>
			<apex:outputField value="{!Sharing_ES__c.Sharing_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Account__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Record_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.isActive__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Access_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Description__c}"/>
			<apex:outputField value="{!Sharing_ES__c.User__c}"/>
			<apex:pageBlockSectionItem />
			<apex:outputField value="{!Sharing_ES__c.Group__c}"/>
			<apex:pageBlockSectionItem />
		</apex:pageBlockSection>
		<apex:pageBlockSection showHeader="false" columns="2">
			<apex:outputField value="{!Sharing_ES__c.CreatedById}"/>
			<apex:outputField value="{!Sharing_ES__c.LastModifiedById}"/>
		</apex:pageBlockSection>
		<apex:pageBlockSection showHeader="true" title="Custom Links" columns="3">
		</apex:pageBlockSection>
	</apex:pageBlock>
</apex:page>
			

 

 

Hi Everyone,

 

I am looking into setting up territories using SF and we are waiting on our Sandbox to be available so I figured I would go ahead and start planning out my territories now.  

 

Here is how our territories are to be setup, we have a list of most of the zip codes in the US with which we want our accounts to be assigned, users will be in charge of accounts based on these territories as well.  Anyways, the file we have has around 42,000 zip codes.  Each of these zip codes rolls up into a territory (52 Territories such as Hartford, Boston, Miami, etc, with an average of around 750 zip codes in each territory) and each of these territories rolls up into a Region (8 regions such as Northeast, Southeast, etc)

 

In summary, we have 3 columns, zip code (42,000 zips), territory (52 territories) and region (8 regions), we want accounts to automatically be assigned to these regions and territories based on the zip codes as well as users to be assigned accounts based on the regions and territories.

 

Is this possible and if so, what would be the best approach?

 

Any input would be greatly appreciated!

 

Thanks

Hi All,

 

I am having trouble creating an edit page using Visualforce.  We created a visualforce page for a custom object and have assigned this visualforce page for the custom object page layout.  We want to create a visualforce page for the edit function as well but I am having issues creating this.  I think we may need to create a controller extension but I am not sure. Here is the sample code we have for our page layout. All we want is to allow this page layout to be edited using a visualforce page.

 

 

 

<apex:page standardController="Sharing_ES__c">
	<apex:sectionHeader title="{!$ObjectType.Sharing_ES__c.label}" subtitle="{!Sharing_ES__c.name}"/>
	<apex:pageBlock title="{!$ObjectType.Sharing_ES__c.label} Detail">
		<apex:pageBlockButtons >
		<apex:form >
			<apex:commandButton action="{!edit}" value="Edit"/>
			<apex:commandButton action="{!delete}" value="Delete"/>
			<apex:commandButton action="{!URLFOR($Action.Sharing_ES__c.Clone,Sharing_ES__c.id)}" value="Clone"/>
		</apex:form>
		</apex:pageBlockButtons>
		<apex:pageBlockSection showHeader="false" columns="2">
			<apex:outputField value="{!Sharing_ES__c.Name}"/>
			<apex:pageBlockSectionItem >
				<apex:outputLabel value="Custom Sharing Owner"/>
				<apex:outputPanel >
					<apex:outputField value="{!Sharing_ES__c.OwnerId}"/>&nbsp;
					<apex:outputLink value="{!URLFOR($Action.Sharing_ES__c.ChangeOwner,Sharing_ES__c.id)}">[Change]</apex:outputLink>
				</apex:outputPanel>
			</apex:pageBlockSectionItem>
			<apex:outputField value="{!Sharing_ES__c.Sharing_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Account__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Record_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.isActive__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Access_Type__c}"/>
			<apex:outputField value="{!Sharing_ES__c.Description__c}"/>
			<apex:outputField value="{!Sharing_ES__c.User__c}"/>
			<apex:pageBlockSectionItem />
			<apex:outputField value="{!Sharing_ES__c.Group__c}"/>
			<apex:pageBlockSectionItem />
		</apex:pageBlockSection>
		<apex:pageBlockSection showHeader="false" columns="2">
			<apex:outputField value="{!Sharing_ES__c.CreatedById}"/>
			<apex:outputField value="{!Sharing_ES__c.LastModifiedById}"/>
		</apex:pageBlockSection>
		<apex:pageBlockSection showHeader="true" title="Custom Links" columns="3">
		</apex:pageBlockSection>
	</apex:pageBlock>
</apex:page>