When using the Transform element in Salesforce Flow, users may encounter an error when trying to map global variables — such as `$User.Id` or `CurrentDate` — directly within the Transform formula builder.
This article explains why this happens and provides the workaround Salesforce recommends until a permanent fix is available.
This article answers the question: why do global variables like `$User.Id` or `CurrentDate` fail when mapped directly in a Flow Transform element, and how do I work around it?
Using a global variable directly within the Transform element mapping triggers the following error:
"These mappings or join transformations are invalid. Make sure that the fields are available and compatible on the referenced objects or Apex classes. Then save and reload the flow, or invalid mappings and invalid join transformations."
The detail typically reads something like: "The '$User.Id' field is no longer available. It was previously mapped to the 'Account[$EachItem].OwnerId' field."
This is a known product limitation. The Transform element does not currently support referencing global variables (for example, the running user's ID or the current date) directly in its mapping logic.
Create a separate formula resource to capture the global variable you need — for example, a formula resource that returns `$User.Id` or `CurrentDate` — and reference that formula resource in the Transform element mapping instead of the global variable itself.
The Product Team has logged a bug for future improvements, including documentation updates and clearer validation messaging when global variables are used in the Transform element.
005167115

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.