Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Salesforce MuleSoft Developer I Topic 10 Question 21 Discussion

Actual exam question for Salesforce's Salesforce MuleSoft Developer I exam
Question #: 21
Topic #: 10
[All Salesforce MuleSoft Developer I Questions]

Refer to the exhibits.

Set paylaod transformer is set the firstName and lastName of the customer as shown in below images.

What is the correct Dataweave expression which can be added in message attribute of a Logger activity to access firstName (which in this case is Madhav) from the incoming event?

Show Suggested Answer Hide Answer
Suggested Answer: D

Correct answer is vars.'customer'.'firstName'

Please note that you can also access firstName using this syntax vars.customer.firstName.

Mule Ref Doc :Variables in Mule Apps | MuleSoft Documentation


Contribute your Thoughts:

Luther
1 months ago
I bet the correct answer is 'firstName' because the question is just testing if we can read. Seriously, who needs DataWeave when you have common sense?
upvoted 0 times
...
Huey
1 months ago
B) customer.firstName is the way to go. Unless you're trying to invoke the spirit of Shakespeare with those 'vars' shenanigans.
upvoted 0 times
Carli
17 days ago
A) firstName is too vague. B) customer.firstName is more specific.
upvoted 0 times
...
Trinidad
19 days ago
B) customer.firstName is correct. No need for the 'vars' confusion.
upvoted 0 times
...
...
Carol
2 months ago
I'm not sure, but I think C) vars.`customer.firstName` might also work because it combines vars and customer.firstName.
upvoted 0 times
...
Glenna
2 months ago
A) firstName? Really? Who names a variable just 'firstName'? That's like naming your dog 'Dog'. C'mon, people, get creative!
upvoted 0 times
Azalee
24 days ago
D) vars.customer.firstName
upvoted 0 times
...
Viola
27 days ago
C) vars.customer.firstName
upvoted 0 times
...
Shasta
30 days ago
B) customer.firstName
upvoted 0 times
...
Noah
1 months ago
A) firstName? Really? Who names a variable just 'firstName'? That's like naming your dog 'Dog'. C'mon, people, get creative!
upvoted 0 times
...
...
Yolando
2 months ago
I disagree, I believe the correct answer is D) vars.`customer`.`firstName` because it uses the vars to access the customer's firstName.
upvoted 0 times
...
Paulene
2 months ago
D) vars.customer.firstName looks more elegant, but B) is the safer bet. Gotta play it safe in these exams, you know.
upvoted 0 times
...
Toshia
2 months ago
I think the correct answer is B) customer.firstName. It's a pretty straightforward data mapping, no need to overcomplicate things.
upvoted 0 times
Sherita
26 days ago
I'm not sure, but A) firstName seems too simple to be the correct answer.
upvoted 0 times
...
Jeannetta
27 days ago
I believe it's D) vars.`customer`.`firstName` to access the nested property.
upvoted 0 times
...
Lashawn
27 days ago
D) vars.customer.firstName
upvoted 0 times
...
Heike
30 days ago
I think it's C) vars.`customer.firstName` because we need to access it through vars.
upvoted 0 times
...
Alline
1 months ago
C) vars.customer.firstName
upvoted 0 times
...
Dominic
1 months ago
I agree, B) customer.firstName seems like the correct answer.
upvoted 0 times
...
Tawanna
2 months ago
B) customer.firstName
upvoted 0 times
...
Sanjuana
2 months ago
A) firstName
upvoted 0 times
...
...
Catarina
2 months ago
I think the correct answer is B) customer.firstName because it directly accesses the firstName of the customer.
upvoted 0 times
...

Save Cancel