Fax field on Contact object

I need to add a fax field on contact object but have that synchronized with ContactCommunication detail (Communication Options). Just like, when a mobile number is added to communication options it automatically updates contact.mobile and vice versa. 

Ideas on how to do it? 

Like 0

Like

6 comments

Hello kumar,

First of all, you'll need to enable the fax communication type for contacts in the Communication option types lookup. See https://share.customerfx.com/GGuWjxy7

Then, once you've added the contact field for Fax on the contact, you can keep it in sync with a process or use an entity event sub-process in the Contact and ContactCommunication objects. The process route is pretty straight forward, however, in order to see it update in the other place right away, you'll want to send a message from the process to the page so you can reload the page and see the change. See https://customerfx.com/article/how-to-refresh-a-page-from-a-process-in-…

Hope this helps

Ryan

Ryan Farley,

Thank you for your reply. 

In the case of contact's phone or email field change on the contact page, the add/edit in contact communication details happen even before save button is clicked. Can such thing be implemented for Fax field as well? 

On account page, unlike contact object, fax field came with out of the box and behaves intuitively, change in account.fax changes right account communiction option right there even before save button is clicked. 

 

Do you think that is not possible with Fax field on Contact? 

Hello Kumar, 

 

The Account object has a base lookup "Fax" field, which can be added to the left panel of the record page and for which the "connection" with the "Communications options"  detail is implemented in a base code, so while changing the value in the column on the left panel the corresponding value will be reflected in the detail (same as for "Email" or "Phone"). However, you can use the "Fax" option for the Contacts record after it's added to the lookup "Communication option types" in the "Communications options"  detail but it won't create "Fax" field for the Contact object. Even after such field is added to the Contact object manually, it still requires the "connection" between field and detail to be implemented by code. As of now, there is no way to implement such functionality only with basic system tools and development is needed.

As a workaround suggestion,  you can proceed with a variant provided by Ryan. 

From our side, we have already registered the corresponding query for our R&D team and will be awaiting for the implementation of the mentioned functionality in the upcoming versions. 

 

Should you have any questions, please let us know!



Best regards,

Anastasiia 

kumar,

Hello kumar. I've not tested this yet, so not 100% sure this will work, but I believe you could do the following and it should work the same as the account page does.

  1. Create a replacing view module for "ContactCommunicationDetail"
  2. Add the following code:
define("ContactCommunicationDetail", ["ConfigurationConstants"], function(ConfigurationConstants) {
	return {
		methods: {
			initMasterDetailColumnMapping: function() {
				this.callParent(arguments);
 
				var mappings = this.get("MasterDetailColumnMapping");
				mappings.push({
					"CommunicationType": ConfigurationConstants.CommunicationTypes.Fax,
					"MasterEntityColumn": "UsrFax" // change this to whatever your Fax column is called on Contact
				});
				this.set("MasterDetailColumnMapping", mappings);
			}
		}
	};
});

That should handle the value getting updated from the communication options detail to the Contact.

Then, on the ContactPageV2 code,

  1. Wire up a change event for the Fax column - see https://customerfx.com/article/triggering-an-event-when-a-field-is-chan…
  2. In the methodName for the change event use the method name "syncEntityWithCommunicationDetail"

Ryan

Thank you Ryan, I actually did the change very close to what you suggested. It works for the UI part of the logic as expected but the Fax field isn't getting saved in the contact object when 'Save' is clicked. 

 

Can't figure out why. 

 

Fax on ContactCommunication is getting updated but fax on contact object is not. The fax field is not passed to the UpdateQuery for contact when Save is clicked. 

Show all comments