cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Continued Contributor
Continued Contributor

Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

Hi all, 

 

I am beginning to try out some integration with Salesforce using Premium connectors. 

 

In my first exercise, I want to just list all Salesforce users with a Username that matches between SF and O365. 

 

I have created 3 variables: 

 

One integer to count all Users in SF. 

One integer to count all matches. 
One string to concatenate all Usernames that matched, one per line. 

 

Send an email to myself with all 3 variables in the body.

 

In my first exercise, I just listed all usernames and everything worked perfectly.

 

In my second exercise, I used a Flow Conditional with the rule: 

Salesforce Username is equal to username@contoso.com (email omitted for privacy). This worked perfectly. 

Advanced mode: (email omitted)

@equals(items('Aplicar_a_cada')?['Username'], 'username@contoso.com')

My variable counting matched resulted in 1 match, which is what I expected. 

 

In my third exercise, I changed the 'equal to' to 'ends with', and used only my domain name.

Advanced mode: (domain omitted)

@endswith(items('Aplicar_a_cada')?['Username'], '@contoso.com)

 

This yielded no matches. The variable to count matches stood at 0 and no emails were listed. 

 

I can't understand why it had this result. Perhaps it needs a special syntax? 

 

 

 

 

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

Hi @TiagoFreire,

 

I find that you are missing a single quote in your expression,

Please modify the expression to:

@endswith(items('Aplicar_a_cada')?['Username'], '@contoso.com')

Best regards,

Alice

Highlighted
Continued Contributor
Continued Contributor

Re: Salesforce: 'is equal to matches email, but 'ends with' does not match domain part of the email.

I double checked that. the single quote was missing on this post but not on the flow code. 

Flow wouldn`t even save if there was a syntax error. 

 

The flow code runs, but does not yield any results. 

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,905)