• Wil Pho
  • NEWBIE
  • 10 Points
  • Member since 2021

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

I have a Contract custom object that has a Status picklist field with Approved and Rejected as options; there is another date field called  Approved Date. I want the Approved Date to populate the current date when Approved is selected. However, there are existing Contract records that should be excluded from this formula. Currently, the formula is as follow:

IF(ISPICKVAL(Status__c,"Approved"),TODAY(), null) 

I know how to create a Flow or PB to do this, but that seems like overkill. 

Is there a formula that would work? Perhaps IsNew() or PRIORVALUE function?

Thanks in advance for the help.

Wil
 
Hi there,

I'm trying to create a validation rule to prevent accounts from being created in our Community Cloud site whose account name contains non-alphanumeric account names. Getting a lot of fake accounts. For example, I want to prevent Asian characters in the account names. I tried various versions. 

I tried these: 

NOT( REGEX( Name , "[a-zA-Z0-9]+"))

NOT( REGEX( Name , "[a-zA-Z0-9_+-]+"))

They blocked this name: "wil test" for some reason. 

Appreciate any help!

Wil
Hi there,

I trying to write a formula in a lookup filter so that when a user enters a contact’s name, it will only display contacts that are associated with the same parent account. The lookup filter is in a Flow.
User-added image
Here’s is the formula:


Id Not In ({!PreviousStudentIds}) AND IsPersonAccount = TRUE AND NU__IsMemberFlag__c = false AND NU__PrimaryAffiliation__c = '{!TroupAffiliationId}'

We use Person Accounts data model and a custom object called Affiliation. The Accounts objects has a self-lookup relationship.

User-added image
The Affiliation object has a lookup (NU_ParentAccount__c) to the Account.

User-added imageTroupAffiliationId is a variable in the Flow that stores the parent account.
User-added image
The filter formula is still displaying contacts that are NOT associated with the same parent account.

Any suggestion as to how to fix the formula?

Thanks,
Wil
Hi there,

The system throws this error whenever a Community Cloud guest user tries to donate to our organization...see attached error.

I have multiple DLRS rollup fields that counts and sums up the donation records, which is around 4000 of them. The rollups are scheduled for a nightly calculation.

I gave read access to the Guest User profile for all the DLRS objects and upgraded to the latest release already, per a post suggestion on Github, but it still doesn't work.

Any help is greatly appreciated!

Thanks,
Wil

User-added imageUser-added image

 
Hi all,

I created a classic email template and have merge fields from a custom object called Order (not the native Salesforce Order object).

The following merged fields don't seem to work:

Order Name:  {!NU__Order__c.Name}
Pay NOW URL:  {!NU__Order__c.PayNowUrl__c}
Payment URL:  {!NU__Order__c.NU__PaymentUrl__c}

However, oddly enough this one works:

Balance: {!NU__Order__c.NU__Balance__c}

And this one works - {!Order.Name} -  even though we aren't using the standard Order object. 

All the above fields on the Order record are populated.  

I even tried fields on a related object (Cart):

TEST: {!NU__Cart__c.NU__PaymentUrl__c}
TEST: {!NU__Cart__c.PayNowUrl__c}

Thanks in advance for any help. Looking through some help docs but have not found any solution yet.

Regards,
Wil
Hi there,

New to writing SOQL scripts using Workbench. So there is a customer object called Affiliation (NU__Affiliation__r) that has a lookup relationship to the Account object.

SELECT Name,
       NU__Account__c,
       NU__ParentAccount__c
       Account.Name
FROM NU__Affiliation__c 


When I run the above script it's throwing the following error. I'm trying to access the parent Account fields. 

MALFORMED_QUERY: only aggregate expressions use field aliasing 

I also tried this script:

SELECT AccountNumber,Id,

(SELECT Name,NU__Account__c,NU__IsPrimary__c

FROM NU__Affiliation__r)

FROM Account

And I got this error:

INVALID_TYPE:
FROM NU__Affiliation__r)
^
ERROR at Row:5:Column:6
Didn't understand relationship 'NU__Affiliation__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.


Would very much appreciate any help!

Regards,
Wil
Hi there, 

I have a Contract custom object that has a Status picklist field with Approved and Rejected as options; there is another date field called  Approved Date. I want the Approved Date to populate the current date when Approved is selected. However, there are existing Contract records that should be excluded from this formula. Currently, the formula is as follow:

IF(ISPICKVAL(Status__c,"Approved"),TODAY(), null) 

I know how to create a Flow or PB to do this, but that seems like overkill. 

Is there a formula that would work? Perhaps IsNew() or PRIORVALUE function?

Thanks in advance for the help.

Wil
 
Hi there,

I trying to write a formula in a lookup filter so that when a user enters a contact’s name, it will only display contacts that are associated with the same parent account. The lookup filter is in a Flow.
User-added image
Here’s is the formula:


Id Not In ({!PreviousStudentIds}) AND IsPersonAccount = TRUE AND NU__IsMemberFlag__c = false AND NU__PrimaryAffiliation__c = '{!TroupAffiliationId}'

We use Person Accounts data model and a custom object called Affiliation. The Accounts objects has a self-lookup relationship.

User-added image
The Affiliation object has a lookup (NU_ParentAccount__c) to the Account.

User-added imageTroupAffiliationId is a variable in the Flow that stores the parent account.
User-added image
The filter formula is still displaying contacts that are NOT associated with the same parent account.

Any suggestion as to how to fix the formula?

Thanks,
Wil
Hi all,

I created a classic email template and have merge fields from a custom object called Order (not the native Salesforce Order object).

The following merged fields don't seem to work:

Order Name:  {!NU__Order__c.Name}
Pay NOW URL:  {!NU__Order__c.PayNowUrl__c}
Payment URL:  {!NU__Order__c.NU__PaymentUrl__c}

However, oddly enough this one works:

Balance: {!NU__Order__c.NU__Balance__c}

And this one works - {!Order.Name} -  even though we aren't using the standard Order object. 

All the above fields on the Order record are populated.  

I even tried fields on a related object (Cart):

TEST: {!NU__Cart__c.NU__PaymentUrl__c}
TEST: {!NU__Cart__c.PayNowUrl__c}

Thanks in advance for any help. Looking through some help docs but have not found any solution yet.

Regards,
Wil
Hi there,

New to writing SOQL scripts using Workbench. So there is a customer object called Affiliation (NU__Affiliation__r) that has a lookup relationship to the Account object.

SELECT Name,
       NU__Account__c,
       NU__ParentAccount__c
       Account.Name
FROM NU__Affiliation__c 


When I run the above script it's throwing the following error. I'm trying to access the parent Account fields. 

MALFORMED_QUERY: only aggregate expressions use field aliasing 

I also tried this script:

SELECT AccountNumber,Id,

(SELECT Name,NU__Account__c,NU__IsPrimary__c

FROM NU__Affiliation__r)

FROM Account

And I got this error:

INVALID_TYPE:
FROM NU__Affiliation__r)
^
ERROR at Row:5:Column:6
Didn't understand relationship 'NU__Affiliation__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.


Would very much appreciate any help!

Regards,
Wil