nickbuc
December 19, 2016, 6:28pm
1
Hi,
How can I use a Company custom field (number of employees) in a Form?
I can only select Custom Fields created with the “Contact” Object but not the “Company” Object.
Thanks a lot for your help!
nickbuc
December 19, 2016, 6:28pm
2
Hi,
How can I use a Company custom field (number of employees) in a Form?
I can only select Custom Fields created with the “Contact” Object but not the “Company” Object.
Thanks a lot for your help!
SeoZe
January 24, 2017, 12:10am
3
I have the same issue… help?
Has this issue been solved yet?
I never used Company custom fields because the behavior is not predictable / useful. For example, I could not get the value of a Company custom field to display in an email to a contact of that company. So I just created the custom fields as “Contact” and not “Company”.
Data exchanged from one Contact to another within the same Company, must be done by API or other means. I would LOVE to find a more simple solution to this.
EP
Hi, looks like fields from company do show on the dropdown for forms:
1 Like
@mzagmajster If you send and email to a Contact listed under CompanyA, and CompanyA has the custom field vatid with data entered, can you use a token e.g. {contactfield=companyvatid} to send that data to the Contact?
I created such a situation with some fallback text {…|did not work} and it only sent the text “did not work”. I didn’t figure out how to insert the data entered in the Company custom field in an email to the Contact associated with that Company.
EP
According to docs here you can use company fields as well: https://docs.mautic.org/en/setup/variables . Make sure you specify alias of the field.
If this does not work, I think this should be considered a bug.
I’m using 4.4.9 and I can’t get company fields pulled through to emails using their alias. I can work around it, but this seems like a bug to me.
joeyk
July 20, 2023, 12:40pm
9
Hi, this is fixed in Mautic 5.
mautic:5.x
← ts-navghane:fix-email-send-with-company-tokens
opened 08:32AM - 14 Nov 22 UTC
<!-- ## Which branch should I use for my PR?
Assuming that:
a = current ma… jor release
b = current minor release
c = future major release
* a.x for any features and enhancements (e.g. 5.x)
* a.b for any bug fixes (e.g. 4.4, 5.1)
* c.x for any features, enhancements or bug fixes with backward compatibility breaking changes (e.g. 5.x) -->
| Q | A
| -------------------------------------- | ---
| Bug fix? (use the a.b branch) | ✅
| New feature/enhancement? (use the a.x branch) | ❌
| Deprecations? | ❌
| BC breaks? (use the c.x branch) | ❌
| Automated tests included? | ✅
| Related user documentation PR URL | mautic/mautic-documentation#...
| Related developer documentation PR URL | mautic/developer-documentation#...
| Issue(s) addressed | Fixes #...
<!--
Additionally (see https://contribute.mautic.org/contributing-to-mautic/developer/code/pull-requests#work-on-your-pull-request):
- Always add tests and ensure they pass.
- Bug fixes must be submitted against the lowest maintained branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too.)
- Features and deprecations must be submitted against the "4.x" branch.
-->
#### Description:
<!--
Please write a short README for your feature/bugfix. This will help people understand your PR and what it aims to do. If you are fixing a bug and if there is no linked issue already, please provide steps to reproduce the issue here.
-->
#### Steps to test this PR:
<!--
This part is really important. If you want your PR to be merged, take the time to write very clear, annotated and step by step test instructions. Do not assume any previous knowledge - testers may not be developers.
-->
1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs [here](https://contribute.mautic.org/contributing-to-mautic/tester))
2. Create company Test1 with address 1 as Test1
3. Create contact and assign company Test1
4. Create company Test2 with address 1 as Test2
5. Then assign company Test2 to contact as primary but let also Test1 as secondary company
6. Create email with tokens like below:
```
{contactfield=email}
{contactfield=companyname}
{contactfield=companyaddress1}
```
7. Send template email via campaign or segment email to the contact created above
8. Observe the company name and address in the email, it should be Test2
<!--
If you have any deprecations, list them here along with the new alternative.
If you have any backwards compatibility breaks, list them here.
-->
You can merge this PR in 4.4.9, and it will work.
1 Like
Thanks, Joey. I’ll work around until we upgrade to 5.