Ask Search:
Max LopezMax Lopez 

I am working on an App that for the local non-profit music venue where I am employed which manages all data relative to each event, and organizes events and staff and band call time on a master calendar.

Many of the events we put on are weekly events that have the same basic staff info and call times with different bands. We are currently storing data on the bands(contact info, members, genre, play hstory etc.) as related objects and all staff info within the Event record(which is modified from the Campaign Object).

Being able to clone events and just change the bands would greatly increase our efficiency, but there are MANY time date fields that inheriet the cloned events date, meaning you have to sort through the record and change each of those dates individually. This is also a issue when creating records, as it is slightly cumbersome to enter the date for each time field when the relevant information is really just the time... For any filed we do not intend to port to the calendar I have elected to use text fields for times for this very reason. 

I am wondering if anyone has found a solution to apply a master date to a record(as it where) and have that Date automaticlly fill the date portion of additional Date/Time fields on that record...

Would be very grateful for advice

Best Answer chosen by Max Lopez
Justin MitchellJustin Mitchell
Hi Max,
I have an answer for you. This was surprisingly much more difficult than I had expected but I was able to experiment and work out the kinks. It was a fantastic learning experience for me. 
Here's what you need.
1. A "master date" field: Master_Date__c
2. A "time" field: Time1__c.
You can then re-use the logic below for as many of these as you want.

Now create a new date/time formula field. This field will smash those two values together to create the final date/time value. Here is the formula you need:
  ISBLANK( Master_Date__c ) || ISBLANK( Time1__c ), 
    CONTAINS( Time1__c, "p"),
    DATETIMEVALUE( TEXT( Master_Date__c ) &  " " & LEFT( Time1__c, FIND(" ", Time1__c) -1) & ":00" ) + (1/24)*8+0.5,
    DATETIMEVALUE( TEXT( Master_Date__c ) &  " " & LEFT( Time1__c, FIND(" ", Time1__c) -1) & ":00" ) + (1/24)*8
A few things to note about this formula:
1. To re-use it for other "time" fields, copy and paste the whole thing and just replace "Time1__c" with the API name of the time field you want to reference

2. This formula uses a specific timezone. This is one weakness of this solution unfortunately. See where it says "+ (1/24)*8" ?  That's in there to adjust the final result for my particular time zone (PST), which happens to have a value of -8 hours. If you are in EST you need to change that 8 to a 5, for example.

3. Another slight weakness in this solution is that the formula relies upon a specific formatting for the time field. The format must either be "h:mm [pm/am]" or "hh:mm [pm/am]" (minus the brackets of course). For example "1:29 am" or "10:58 pm". If you leave out the space you'll get an error.

Fortunately, you can enforce this formatting using a validation rule using the REGEX command.
Unfortunately, you are going to need a separate validation rule for each time field. Otherwise if you lump all the rules into one, and a user encouters a validation error, they'll have no way of knowing WHICH particular field triggered the error. 

Here is the code you'll need for your validation rule:
REGEX(Time1__c, "[0-9]{1,2}:[0-5]{1}[0-9]{1}[\\s]{1}[aApPmM]{2}")
Just substitute "Time1__c" for the API name of each time field.
My regex skills are not great, so I know there are flaws in this, but it will work for most cases. One flaw I know of, for example, is that this allows someone to enter any two-digit number in for the hour, such as 99:12, and that's going to produce an error, but that should be obvious.

If this is a concern you could always create a second validation rule on the Date/Time formula field itself, something like this:
TEXT(Date_Time1__c) = "#Error!"
This will throw an error on the page and won't let you save if the Date/Time1 field is going to produce an error instead of a date/time value like it's supposed to.

Well, that was fun. Let me know if you have any concerns. Here is a screenshot of the final formula in action!
User-added image

Will McDanelWill McDanel 
I am new to Salesforce and was just assigned as the administrator.  I am attempting to dissable the previous administrator's user account.  When I remove the check mark from the "Active" box and click save, I get the error message: "You can not deactivate a user who is a Portal Administrator"

Where can I remover this user as a Portal Administrator?  My Org never delployed any Portals.

I am sure this is something that is easy to do.... I just can't find the proper screen.  Any help would be appreciated.

Best Answer chosen by Moderator ( 
Syed Y. TalhaSyed Y. Talha
  1. Click Your Name | Setup | Customize | Customer Portal | Settings.
  2. Click Edit next to the name of the Salesforce Customer Portal you want to customize.
  3. Select your self as "Administrator"
also check 

Click Your Name | Setup | Customize | Partners | Settings.
2. Click Edit next to the name
3. Select your self as "Administrator"

in addition to that check following knowledge article

This should solve your problem. 

Satheeskumar ISatheeskumar I 
   I am planing to give ADM201 Exam within this week.
   As preparation alone not sufficient for the exam I need MOCK exam papers for ADM201 which will help me to clear this exam.
   If you have MOCK Exam papers for ADM201, please provide me.

Many thanks
Best Answer chosen by Moderator ( 
Matthew LambMatthew Lamb
Abhi LakshayAbhi Lakshay 
Throwing an incorrect parameters error in process builder: 

Today() > [Account].Enrollment_Date__c, 

ISPICKVAL([Account].Subscription_Status__c, "Active"), ISPICKVAL([Account].Subscription_Status__c, "Pending Start Active")

Best Answer chosen by Abhi Lakshay
Mayank SrivastavaMayank Srivastava
So your formula should look like this:
Subscription Status           Equals          Formula

And for the formula use this:
  TODAY() > [Account].Enrollment_Date__c,
  "Pending Start Active"

That's it.
Jaime GutierrezJaime Gutierrez 
I need to create a validation that if my GL object has a value of 1 in a formula field i'm only allowed to select one of the listed dimensions below.  i can't seem to get it to work.  this is what i have so far:

AND(c2g__GeneralLedgerAccount__r.Allowed_Dimensions_A__c = "1",
AND(NOT(OR(c2g__Dimension2__r.Name = "24 - Repairs")),
NOT(c2g__Dimension2__r.Name = "25 - Maintenance"),
NOT(c2g__Dimension2__r.Name = "26 - Restoration"),
NOT(c2g__Dimension2__r.Name = "27 - Construction"),
NOT(c2g__Dimension2__r.Name = "29 - HVAC")))

thanks in advance for your help.  
Best Answer chosen by Jaime Gutierrez
Mayank SrivastavaMayank Srivastava
Jaime, use this:
  c2g__GeneralLedgerAccount__r.Allowed_Dimensions_A__c = "1",
    "24 - Repairs", 1,
    "25 - Maintenance", 1,
    "26 - Restoration", 1,
    "27 - Construction", 1,
    "29 - HVAC", 1,
   ) = 0
Alex Hamilton-McLeodAlex Hamilton-McLeod 
I'm trying to set the opportunity close date in a Flow to one month from today.

The syntax below doesn't work though

{!$Flow.CurrentDate} + 1 MONTH

Any idea what the correct syntax would be?
Best Answer chosen by Alex Hamilton-McLeod
Pritam ShekhawatPritam Shekhawat
Hi Alex,
           DATE(CurrentDate)+1 gives you a date that’s one day after the CurrentDate.
Try this formula
{!$Flow.CurrentDate} + 30

Pritam Shekhawat
Sarah DavisonSarah Davison 
I have two reports to track daily activity. One is an activity on opportunity report and the other is activity on accounts report. The acitivity on accounts report includes opportunity activity. Is there a way to filter out activity related to opportunities in the accounts report without using cross-filter? I am on professional edition and do not have access to this.
Best Answer chosen by Sarah Davison
Sunil SarillaSunil Sarilla
Hi Sarah,
Please do the below
Create a custom formula field on Activity Object
Field Label: Related to Account
Formula return type Checkbox
formula is
LEFT(WhatId,3) = "001"
 As per the above formula the checkbox will be checked to True if Account is selected under Related To field.

Now Create a Report using the report type Activities with Accounts and add field filter
Related to Account equlas True

This report will only return Activities related to Accouts but where Account is selected under related to field
Karleen MendozaKarleen Mendoza 
Just created a few articles - utilizing the same article type I've utilized before and for some reason I cannot edit them anymore? Thoughts?

User-added image
Best Answer chosen by Karleen Mendoza
Karleen MendozaKarleen Mendoza
Figured it out... for some reason these got stuck in drafts even after the published button was hit.
Sandi MainSandi Main 
How do I move content from my private library to a shared library? Is there a privilege that I need to be able to do that? 

I reviewed this document, but I don't see anything about moving content:
Best Answer chosen by Sandi Main
Kiran RavikantiKiran Ravikanti
Hello Sandi,

You can click on the content itself and Edit -> Library Actions -> Move to Another Library. shown in image below. You have to be a content Admin for the Library in order to do this.

move content between libraries

Abhi LakshayAbhi Lakshay 

DATE ( IF(MONTH(TODAY()) = 12, YEAR(TODAY()) + 1, YEAR(TODAY())), IF(MONTH(TODAY()) = 12, 1, MONTH(TODAY()) + 1), 1 )

This formula returns the 1st day of the next month. The requirement now has changed to :

If the record is created on or before 15th of the month, the formula returns 1st of current month and if its after 15th of the month, its returns 1st of next month(like in the case above)

Best Answer chosen by Abhi Lakshay
Mayank SrivastavaMayank Srivastava
Abhi, the formula should be this:
  DAY(DATEVALUE(CreatedDate)) > 15,
    IF(MONTH(TODAY()) = 12, YEAR(TODAY()) + 1, YEAR(TODAY())), 
    IF(MONTH(TODAY()) = 12, 1, MONTH(TODAY()) + 1), 1 
  DAY(DATEVALUE(CreatedDate)) <= 15,
This says that if the record is created on or before 15th of the month, the formula returns 1st of current month and if its after 15th of the month, its returns 1st of next month.