What variables (if any) are available when populating a field with Evaluate PHP?
For example, in a Durpal User to SF Contact fieldmap, I'm trying to write a query that would populate a field with the user's role, so I need to know at least the users uid (not the currently logged in user, but the user being updated). Is that variable available?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | exampe php evaluation field kpr.png | 29.81 KB | texas-bronius |
Comments
Comment #1
balsamaJust realized that I can use $_POST values from the form in question (user_profile_form in my case).
Never mind...
Comment #2
texas-bronius commentedIt's a worthy question. Stepping through module code, looks like at least two useful variables are available:
$drupal_datais the Drupal node loaded to feed your SFDC integration. Consider concatenating two fields like first and last name here-- is there a better place?$maprepresents the Drupal -> SFDC field mapping definitionWith devel module enabled, you can slyly insert a kpr($drupal_data); before your return value in a php evaluation field. Something like the attached screenshot example.