cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TiagoFreire
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
v-yuazh-msft
Community Support
Community Support

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

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (96,756)