• Rick SF Admin
• NEWBIE
• 90 Points
• Member since 2017

• Chatter
Feed
• 0
Best Answers
• 2
Likes Received
• 0
Likes Given
• 24
Questions
• 29
Replies
Hi,
I have a custom object (Demo__c). In this object, I would like to have a custom field that would count and display the number of records for this object based on a filter criteria. I know this can be accomplished using Reports but I want a field on the object itself to show this information. For example, the Demo object has 100 records. Of the 100 records, I want to see in this custim field how many records have a total revenue value less than or \$1,000,000. If there are 10, then the custom field should show 10.
I have a formula field (Avg__c) that calculates the average of 4 custom fields (Base_Q1__c, Base_Q2__c, etc....) .

Formula:
```(IF(ISNULL(Base_Q1__c),Null,Base_Q1__c) + IF(ISNULL(Base_Q2__c),Null,Base_Q2__c)+IF(ISNULL(Base_Q3__c),Null,Base_Q3__c) +IF(ISNULL(Base_Q4__c),Null,Base_Q4__c))
/
(IF(ISNULL(Base_Q1__c),Null,1) + IF(ISNULL(Base_Q2__c),Null,1)+IF(ISNULL(Base_Q3__c),Null,1) + IF(ISNULL(Base_Q4__c),Null,1)```
The problem is that I'm trying to establish a “running average” but it only calculates the average if all 4 custom fields (Base_Q1__c...) contain a value. If one of the 4 fields are blank, then the formula field will not calcuate anything.  I need it to calculate the average no matter how value are displayed or blank.

WITH ALL 4 VALUES - AVG Calculates:

WITHOUT ALL 4 VALUES - No AVG Calculation:

Please help!!!

Is it possible to create a custom text field that will list all the records (Account names) from a related list of the parent object in real-time? The reason for this is that I'm using Conga to create PowerPoint templates and using a report to popoulate the data. But I need all the data from multiple related list displayed in this template. So if can have a text field that updates the list with the name of the accounts that are created or currently exist, this will resolve my issue.

EXAMPLE
Parent Object
Custom Text Field: Record A, Record B, Record C (data from related list)

Related List:
Record A
Record B
Record C
I have a custom date field called Last_Awarded_Date__c on the Accounts object. In the related list of the Accounts object is a custom Opportunities object with an Award_Date__c (date) field and an Awardee_PP_Score__c (number) field. I'm trying to have the Last_Awarded_Date__c field in the Accounts object automatically updated with the date of the most recent Award_Date__c with an Awardee_PP_Score__c from the custom Opportunites object in the related list.  (See images below).

Accounts Object

Related List - 7/10/2018 should be the date in the Last_Award_Date__c field in the Accounts object
I have a custom formula text field using the formula shown below. The output from this formula gives me what I need for the most part, except now I'm trying to add the letter "M" to the end of the value in that field (i.e. \$23.5M). I've tried adding the "M" to the forumla following other documentation but no luck. What am I missing?
```CASE(LEN(TEXT( Revenue__c )),
1, TEXT(Revenue__c),
11, '\$'+TEXT (ROUND(Revenue__c /1000000, 1)),
10, '\$'+TEXT (ROUND(Revenue__c /1000000, 1)),

TEXT(LEN(TEXT( Revenue__c )))
)```
I have a custom object with a custom currency field called Revenue__c where users enter the exact dollar amount (i.e. \$23,187,098.88). I trying to create a formula field called Rev__c that I will display the values from the Revenue__c field rounded to a specified number.

For Example:
IF (Revenue__c) =  \$23,187,098.88  THEN (Rev__c) = "\$23.2M" - nearest 100,000

IF (Revenue__c) =  \$3,187,098.88  THEN (Rev__c) = "\$3.2M" - nearest 100,000

IF (Revenue__c) =  \$318,700  THEN (Rev__c) = "\$0.32M" - nearest 10,000

IF (Revenue__c) =  \$87,098  THEN (Rev__c) = "\$0.087M" - nearest 1,000
I'm trying to create a way to completely lock a record Org-Wide for a custom object (Announcement__c) 7 days (or even 7 business days) after the Status (picklist) has been changed to "Cancelled". Only system admins should have the rights to edit these records 7 days after the status changed. I also want to prevent users from changing the Status from "Cancelled" back to any other value after the 7 days. Currently I have a validation rule I've created (see below) but making it "time-based" and completely uneditable is the challenge. I'm not sure if this is the best approach but any other suggestions are apprecitated.

AND(
\$Profile.Name <> 'System Administrator',
OR(
ISPICKVAL(Status_Master__c , "Cancelled")
))
I'm using Conga Composer to populate Salesforce data in a PowerPoint presentation from a report. Formula functions from the Report object is not recognized as a field so Conga won't capture that data. Is there a way that I can create a custom field that will display the total number of records based on a specific criteria?

For example:
Calculate the total number of IT Division opportunity records with a revenue of \$50m or more.
COUNT: 27
Has anyone figured out a way to have hover details popup from the hypertext links in a (Lightning) list view like in the image below? I have a custom object and a client is requesting this feature. I know there are a few "ideas" about this but I wanted to know has anyone found a workaround? Like using a VF page maybe?

I seen an "Idea" for this topic, but I was wondering
I have a custom object (Resources__c). I'm trying to create a custom button on the custom object that when clicked, will updated a picklist value to "Requested" and trigger an email alert (RR Alert). I know I can accomplish this without using a custom button (using WFR), but the requestor wants a button on the custom object.
Is there a way to create an Approval Process where the final decision is based on a "majority rules" structure? The current "all-or-none" structure sucks because if there is a rejection from one of the approvers then the request is "Rejected" and "No Response" is set for the remaining approvers. I would like the Approcess Process to be based on an acutal vote count.
I've created a custom object (Bids__c) related to another (master) object (Opportunites__c). The Opporunities object has a custom lookup user field called VP (VP__c). The Bids object also has a custom lookup user field called VP (VP__c). I'm trying to set this up so that when a New Bids record is created from the related list of the Opportunites object, the VP__c field autopopulates with the same (lookup) user from the related Opportunities record. I do not want users to have to manually choose a VP on the Bids object.

Bids are connected to an Approval Process that the Related User, in this case is the user in the VP__c field, has to approve.

Please Help! Thanks.

I have two custom objects; ObjectA__c and ObjectB__c. ObjectA is the master object that has 5 (user) lookup fields. ObjectB is related to ObjectA and has the same 5 (user) lookup fields as ObjectA. When users click "New" to create a new record for ObjectB from the related list of ObjectA, I need the 5 respective lookup fields to auto-poputate with whatever names are listed in the related ObjectA record. Also, if one of the lookup fields in ObjectA are updated, the related ObjectB record should automatically update as well. Please advise. Thanks.

ObjectA                                                                                          ObjectB
Producer__c (lookup): John Smith                                                 Producer__c (lookup): John Smith
Manager__c (lookup): Mike Jones                                                 Manager__c(lookup): Mike Jones

I created a visualforce page that renders as a PDF from a custom object. I have a text area field (Description__c) that is on the VF page to be displayed. My issue is when the page is generated, the visuaforce page changes the format of the text in the text are field by bunching it together as if it is one large paragraph.

Example Text Area field:
Demo, LLC would like to announce the following projects:
* Home Improvements
* IT Refresh
* Interior Renovation

Visualforce Page Output:
Demo, LLC would like to announce the following projects:* Home Improvements * IT Refresh* Interior Renovation

How can I fix this?
I want to created the exact image below for a visualforce page that'll render as a pdf. The border-line is needed also.

MY CODE:
<apex:page standardController="Newsletter__c" renderAs="pdf" extensions="MyPageController">

<div class="header">
Contact: First Last Name<br/>
Demo, Inc. <br/>
Phone: (301)222-2222
<img src="{!\$Resource.companylogo}" width="20%"/>
</div>
&nbsp;
&nbsp;

I have a visualforce page rendered as a PDF called "Agreement" that is generated from a button on a custom object called "Agreements". The "Agreements" object has a field that identifies the Account (standard SF object) the Agreement is associated with. When saving or downloading the PDF, the name of the file is always the name of the visualforce page (Agreement.pdf). How can I define the file name when saved or downloaded as the following:

Account: Demo Tech,LLC.

Save PDF filename: Demo Tech,LLC._Agreement_Today's Date

PS. I know this has been asked before by others, but the apex class "solutions" I've read did not work for me.

How can I create the exact image below on my visualforce page rendered as PDF? "ABC INDUSTRIES, INC." will autopopulate from the Account Name of the record from the custom object, however I would like the account name to appear bold and in ALL CAPS as seen in the image.

I created for a custom object (Demo__c) with a button that will render the record as a Visualforce Page PDF. I have a Master-Detail field in the Demo object that lookup the standard Account object. When I added the following code {!Demo__c.Account__c} and generated the PDF, it shows up in the PDF as the Account ID opposed to the Name displayed on the object. See PDF Example below:

PDF Example: "We are proud to announce that we now have a partnership with {!Demo__c.Account__c} (01214141421241b <--should display the Account name) for 3 years."

How can I have it display Account name AND the respective Account's BillingAddress?
I created a button on my custom object (Education__c) that creates a PDF for that record. I am trying to code my visualforce (PDF) page so that when the value "Other" is selected from the State__c picklist field, "Other" will not display on the PDF. For exmaple:

Picklist Values:
MD
DC
VA
Other

IF "Other" is selected, the State (picklist) field is left Blank when the pdf is generated.
I created a WFR formula that automatically inputs/updates (project expiration) Date fields based on the picklist value that is selected. I also created a time-based WFR that sends email alerts 30, 60,90 days prior to that Date. Is there a way that I can set the email alerts to only go to a specific group of users based on the picklist value that is selected?

Example:
IF Picklist Value = Project A or Project B or Project C
Send the 30 day (60 or 90 depending on the expiration Date field) email alert to User 1 and  User 2 ONLY

IF Picklist Value = Project D or Project E or Project F
Send the 30 day (60 or 90 depending on the expiration Date field) email alert to User 3 and User 4 ONLY

This is my current Time Based Workflow Rule:
Description: Notifies management 30/60/90 days prior to Project#1 Exp Date
Rule Criteria: Project: Project #1 Exp Date NOT EQUAL TO null

Time-Dependent Workflow Actions
Email Alert Alert 90 days before Project#1 Exp Date
Email Alert Alert 60 days before Project#1 Exp Date
Email Alert Alert 30 days before Project#1 Exp Date

I have a visualforce page rendered as a PDF called "Agreement" that is generated from a button on a custom object called "Agreements". The "Agreements" object has a field that identifies the Account (standard SF object) the Agreement is associated with. When saving or downloading the PDF, the name of the file is always the name of the visualforce page (Agreement.pdf). How can I define the file name when saved or downloaded as the following:

Account: Demo Tech,LLC.

Save PDF filename: Demo Tech,LLC._Agreement_Today's Date

PS. I know this has been asked before by others, but the apex class "solutions" I've read did not work for me.

I'm creating a VF page for employees to create a record for a custom object. I'm having issues writing the redirect Apex code so that after they hit "Submit", the employees will be redirected to another VF page (that I've created called "SuccessPage") that says "Your profile has been submitted successfully". After five seconds the SuccessPage it automatically redirect to the company's website. But if the employee hits Cancel, it will close the VF page.

Record Code
```<apex:page standardController="Object__c">
<apex:form >

<div class="header">
<center><img src="{!\$Resource.companylogo}" width="10%"/></center>
</div>

<style>
body .bPageBlock .pbBody .blue .pbSubheader{
background-color:#154f82;

}
body .bPageBlock .pbBody .white .pbSubheader h3{
color:#ffffff;
}
</style>

<apex:outputPanel styleClass="blue" layout="block">
<apex:pageBlockSection title="Skills" id="section7">
<apex:inputField value="{!Employee_Profile__c.Skills__c}"/>
</apex:pageBlockSection>
</apex:outputPanel>

</apex:pageBlock>

<center><apex:commandButton value="Submit" action="{!save}"/><apex:commandButton value="Cancel" action="{!cancel}"/></center>

</apex:form>
</apex:page>```
Success VF page
```<apex:page >
<h1>Success</h1>

<script type="text/javascript">
window.setTimeout("redirectpage();", 5000);
function redirectpage(){
window.top.location.href = 'http://www.website.com';
}
</script>
</apex:page>```

I have a formula field (Avg__c) that calculates the average of 4 custom fields (Base_Q1__c, Base_Q2__c, etc....) .

Formula:
```(IF(ISNULL(Base_Q1__c),Null,Base_Q1__c) + IF(ISNULL(Base_Q2__c),Null,Base_Q2__c)+IF(ISNULL(Base_Q3__c),Null,Base_Q3__c) +IF(ISNULL(Base_Q4__c),Null,Base_Q4__c))
/
(IF(ISNULL(Base_Q1__c),Null,1) + IF(ISNULL(Base_Q2__c),Null,1)+IF(ISNULL(Base_Q3__c),Null,1) + IF(ISNULL(Base_Q4__c),Null,1)```
The problem is that I'm trying to establish a “running average” but it only calculates the average if all 4 custom fields (Base_Q1__c...) contain a value. If one of the 4 fields are blank, then the formula field will not calcuate anything.  I need it to calculate the average no matter how value are displayed or blank.

WITH ALL 4 VALUES - AVG Calculates:

WITHOUT ALL 4 VALUES - No AVG Calculation:

Please help!!!

Is it possible to create a custom text field that will list all the records (Account names) from a related list of the parent object in real-time? The reason for this is that I'm using Conga to create PowerPoint templates and using a report to popoulate the data. But I need all the data from multiple related list displayed in this template. So if can have a text field that updates the list with the name of the accounts that are created or currently exist, this will resolve my issue.

EXAMPLE
Parent Object
Custom Text Field: Record A, Record B, Record C (data from related list)

Related List:
Record A
Record B
Record C
I have a custom date field called Last_Awarded_Date__c on the Accounts object. In the related list of the Accounts object is a custom Opportunities object with an Award_Date__c (date) field and an Awardee_PP_Score__c (number) field. I'm trying to have the Last_Awarded_Date__c field in the Accounts object automatically updated with the date of the most recent Award_Date__c with an Awardee_PP_Score__c from the custom Opportunites object in the related list.  (See images below).

Accounts Object

Related List - 7/10/2018 should be the date in the Last_Award_Date__c field in the Accounts object
I have a custom formula text field using the formula shown below. The output from this formula gives me what I need for the most part, except now I'm trying to add the letter "M" to the end of the value in that field (i.e. \$23.5M). I've tried adding the "M" to the forumla following other documentation but no luck. What am I missing?
```CASE(LEN(TEXT( Revenue__c )),
1, TEXT(Revenue__c),
11, '\$'+TEXT (ROUND(Revenue__c /1000000, 1)),
10, '\$'+TEXT (ROUND(Revenue__c /1000000, 1)),

TEXT(LEN(TEXT( Revenue__c )))
)```
I'm trying to create a way to completely lock a record Org-Wide for a custom object (Announcement__c) 7 days (or even 7 business days) after the Status (picklist) has been changed to "Cancelled". Only system admins should have the rights to edit these records 7 days after the status changed. I also want to prevent users from changing the Status from "Cancelled" back to any other value after the 7 days. Currently I have a validation rule I've created (see below) but making it "time-based" and completely uneditable is the challenge. I'm not sure if this is the best approach but any other suggestions are apprecitated.

AND(
\$Profile.Name <> 'System Administrator',
OR(
ISPICKVAL(Status_Master__c , "Cancelled")
))
I have two custom objects; ObjectA__c and ObjectB__c. ObjectA is the master object that has 5 (user) lookup fields. ObjectB is related to ObjectA and has the same 5 (user) lookup fields as ObjectA. When users click "New" to create a new record for ObjectB from the related list of ObjectA, I need the 5 respective lookup fields to auto-poputate with whatever names are listed in the related ObjectA record. Also, if one of the lookup fields in ObjectA are updated, the related ObjectB record should automatically update as well. Please advise. Thanks.

ObjectA                                                                                          ObjectB
Producer__c (lookup): John Smith                                                 Producer__c (lookup): John Smith
Manager__c (lookup): Mike Jones                                                 Manager__c(lookup): Mike Jones

I want to created the exact image below for a visualforce page that'll render as a pdf. The border-line is needed also.

MY CODE:
<apex:page standardController="Newsletter__c" renderAs="pdf" extensions="MyPageController">

<div class="header">
Contact: First Last Name<br/>
Demo, Inc. <br/>
Phone: (301)222-2222
<img src="{!\$Resource.companylogo}" width="20%"/>
</div>
&nbsp;
&nbsp;

I have a visualforce page rendered as a PDF called "Agreement" that is generated from a button on a custom object called "Agreements". The "Agreements" object has a field that identifies the Account (standard SF object) the Agreement is associated with. When saving or downloading the PDF, the name of the file is always the name of the visualforce page (Agreement.pdf). How can I define the file name when saved or downloaded as the following:

Account: Demo Tech,LLC.

Save PDF filename: Demo Tech,LLC._Agreement_Today's Date

PS. I know this has been asked before by others, but the apex class "solutions" I've read did not work for me.

How can I create the exact image below on my visualforce page rendered as PDF? "ABC INDUSTRIES, INC." will autopopulate from the Account Name of the record from the custom object, however I would like the account name to appear bold and in ALL CAPS as seen in the image.

I created for a custom object (Demo__c) with a button that will render the record as a Visualforce Page PDF. I have a Master-Detail field in the Demo object that lookup the standard Account object. When I added the following code {!Demo__c.Account__c} and generated the PDF, it shows up in the PDF as the Account ID opposed to the Name displayed on the object. See PDF Example below:

PDF Example: "We are proud to announce that we now have a partnership with {!Demo__c.Account__c} (01214141421241b <--should display the Account name) for 3 years."

How can I have it display Account name AND the respective Account's BillingAddress?