• AJH
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hello Community-

 

We do a pretty good job of maintaining the Manager field on the User record for all SFDC users.  We'd like to be able to use this comprehensive maintenance to help us build reporting heirarchy pictures.  At first I thought this would be relatively straight forward, but I'm having difficulty finding a way to make criteria:

 

where manager = John Q CFO OR

manager's manager = John Q CFO OR

manager's manager's manager = John Q CFO etc.

 

I assumne there's a 7 level max before we get to the CEO.

 

I tried to build this with a custom report type (user --> User (Manager)) and tried to make it go 4 objects deep - still can't reflect the hierarchy in a report.

 

My next idea is to run the query somehow with a visualforce page - anybody know how to do this and/or have any other elegant solutions?

 

Thanks!

-Aaron

  • January 06, 2012
  • Like
  • 0

Hello the the glorious community.  

I'm trying to create a PUBLIC (no login required) visualforce form for a person to submit information about themselves, then post the information they provide into a custom object.  So far the great posts on this site have been very helpful for me to get started and I've got a somewhat working model.  But...

 

I have a few questions:

1 - When I enter data into the form properly and submit, I'm not redirected to www.google.com - why? and how can I fix it

2 - When I do not enter data into the form properly (e.g. Zip and State are required), nothing seems to happen - any idea what's going on?

3 - If I try to browse to the public website whilst not logged into my SFDC instance, I am unable to submit or fill out any of the form fields - What do I need to change to make this fully public?

 

Thanks in advance for any help! (PS - I'm a newbie in all visualforce, APEX, and web development!)

 

I setup a class to control the submit form:

---------------------------------------------------------

public with sharing class Registration{

    public List<Registration__c> Registration {get; set;}
    
    public Registration(){
        Registration = new List<Registration__c>();
        Registration.add(new Registration__c());
    }
    

    public PageReference Submit(){
        insert Registration;
        PageReference home = new PageReference('http://www.google.com');
        home.setRedirect(False);
        return home;
    }
}

--------------------------------------------------------

 

Next I build a visualforce page to with input fields to submit information:

-------------------------------------------------------

<apex:page standardStylesheets="false" showHeader="false" sidebar="false" controller="Registration">
<apex:form >
<apex:pageBlock >

<apex:pageBlockButtons >
<apex:commandButton value="Submit" action="{!Submit}" rerender="error"/>
</apex:pageBlockButtons>

<apex:PageBlockTable value="{!Registration}" var="a" id="table">
<table border="1">
<apex:column >

First Name<apex:inputField Label="First Name" value="{!a.First_Name__c}"/>
Last Name<apex:inputField Label="Last Name" value="{!a.Last_Name__c}"/>
Phone Number<apex:inputField Label="Phone Number" value="{!a.Phone_Number__c}"/>
Street Address<apex:inputField Label="Street Address" value="{!a.Street_Address__c}"/>
City<apex:inputField Label="City" value="{!a.City__c}"/>
State<apex:inputField Label="State" required="TRUE" value="{!a.State__c}"/>
Zip<apex:inputField Label="Zip Code" required="TRUE" value="{!a.Zip__c}"/>

</apex:column>
</table>
</apex:PageBlockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

 

  • December 06, 2011
  • Like
  • 0

Let's say that I have a URL that leads to a visualforce SUBMIT form.  In a few fields I'd like to pass a value e.g.  &fieldA=text1&fieldB=text2

 

I'd like text1 and text2 to end up in fields ready to be submitted.  Is this possible?  If so, anybody have any input how?

 

Thanks!

 

Hin

  • November 28, 2011
  • Like
  • 0

I'm very new to trigger building, but I think this is my only option for fulfilling this process.

 

We'd like to create a lookup table that is managed independantly.  A REGION table will contain a region name, and an "assignment" person.  (lookup to the USER object).

 

Next, we'll have a "zip codes" table that needs to include the "assignment" person based on the REGION (lookup to the REGION table).

 

I've tried to set this up with workflow, but there's no way to have the USER lookup variable based on the region without making a million rules.

 

Here are the tables i'd like after the trigger run (simplified)  (e.g <field name> (<data1>, <data2>, etc.))

Region Table

Region Name (region1, region2, region3)

Assignment (George, Jim, Stacy)

 

Zips Table

Zip Name (11111,22222,33333,44444,55555)

Region (region1, region1, region2, region2, region3)

Assignment (George, George, Jim, Jim, Stacy)

 

The region table is created first, then zip rows are created and assigned regions.  After a region is set, the assignment field is populated by the trigger.

 

Thanks for any help from the community!

Aaron

  • November 22, 2011
  • Like
  • 0

Hello Community-

 

We do a pretty good job of maintaining the Manager field on the User record for all SFDC users.  We'd like to be able to use this comprehensive maintenance to help us build reporting heirarchy pictures.  At first I thought this would be relatively straight forward, but I'm having difficulty finding a way to make criteria:

 

where manager = John Q CFO OR

manager's manager = John Q CFO OR

manager's manager's manager = John Q CFO etc.

 

I assumne there's a 7 level max before we get to the CEO.

 

I tried to build this with a custom report type (user --> User (Manager)) and tried to make it go 4 objects deep - still can't reflect the hierarchy in a report.

 

My next idea is to run the query somehow with a visualforce page - anybody know how to do this and/or have any other elegant solutions?

 

Thanks!

-Aaron

  • January 06, 2012
  • Like
  • 0

The requirement is to lock a opportunity record for editing after the Stage field is changed to "closed/won". Can someone advice how to achieve this.

 

Thanks

Let's say that I have a URL that leads to a visualforce SUBMIT form.  In a few fields I'd like to pass a value e.g.  &fieldA=text1&fieldB=text2

 

I'd like text1 and text2 to end up in fields ready to be submitted.  Is this possible?  If so, anybody have any input how?

 

Thanks!

 

Hin

  • November 28, 2011
  • Like
  • 0

Trying to standardize our greeting in all of our Email Templates used in responses, and we want to simply have a custom function that when added to an email template will look like:

 

Hi,

Thank you for contacting us.

 The challenge with using the BR() tag is that it actually inserts as:

 

Hi,<br>Thank you for contacting us.<br>

 Which obviously won't render properly in a text email.

 

I've tried adding in \r\n, \n, just adding a carriage return in my formula, but can't seem to get any of that to work. Also tried the following, but no luck.

("Hi," & '\n' & "Thank you for contacting us." & '\n')

 

Any thoughts?

 

 

 

 

Hello,

I am attempting to write an Apex trigger to look up the ManagerID for the record owner, the post the Manager email address into a custom field on the current record.

 

I'm new to Apex and having difficulty developing this code, which seems like it should be relatively simple.

 

Anyone have examples of such functionality?

 

Thanks!

J