Seems like it would be very useful to allow token format strings to be entered in fieldmap settings, alongside fixed value and PHP input; they are obviously more flexible than fixed value but don't have the security issues that PHP evaluation does.

Comments

EvanDonovan’s picture

Hmm...this sounds like a great idea. I'm tempted in 7.x to remove the PHP evaluation entirely, or at least to make it part of a separate module. That said, I wouldn't have the time for this in the short term, but a patch would be great.

EvanDonovan’s picture

Issue tags: +7.x-2.x

To put on the 7.x-2.x roadmap (medium priority).

vasike’s picture

subscribe. patch or separate module?

kostajh’s picture

I think token support belongs in the Suite.

vasike’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new2.16 KB

first i changed to 7
then ... there is patch for it.

there are some problems with the Fieldmap form. It doesn't understand the Fieldset and other forms stuff in the right way.

EvanDonovan’s picture

Yes, the fieldmap form was not ported 100% correctly. Some of it was automatically ported.

If you know how to fix any of the underlying issues, that would be appreciated.

EvanDonovan’s picture

I think some people might be interested in 6.x version (since that is where over 90% of users are currently), and where the original request was for.

It's probably fine to have this be in 7.x for now though, since there didn't seem to be a patch forthcoming for 6.x.

As to fixing the issues with the fieldmap form, I can't make a promise as to when I would have time for that - this particular functionality would be nice, but is not crucial for my use case.

vasike’s picture

I think this also usefull to have Salesforce ID's defined as Entity tokens.

vasike’s picture

is there a reason not to commit this?

actually, yes. could be because of the fieldmap form js.

aaronbauman’s picture

2 changes:
1. #token_tree is not available unless contrib token module is enabled.
2. updated support for javascript show/hide extra value field. depends on #1199026-2: JS in fieldmapping UI not working despite attach behaviors switch

vasike, let me know if it works for you and we'll get it into dev.

aaronbauman’s picture

StatusFileSize
new2.83 KB

.... and the patch

vasike’s picture

yes right. as i said [1199026#3]. thanks a lot

EvanDonovan’s picture

Great work, vasike and aaron! I will commit this in a few hours (after testing, of course).

EvanDonovan’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

Committed: http://drupalcode.org/project/salesforce.git/commit/107edaf.

Moving back to 6.x-2.x, where the patch will probably need to be re-done significantly.

Anonymous’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Thank you for adding this. What is the procedure for using these tokens? %value[key] did not work for me. Need this for forms being passed to Leads.

kostajh’s picture

Status: Patch (to be ported) » Closed (won't fix)