Is there any way to add the opportunity contact -> mobile phone number field in the opportunity form? That way I don't have to click through to the contact to be able to call them about the opportunity.
*This post is locked for comments
Is there any way to add the opportunity contact -> mobile phone number field in the opportunity form? That way I don't have to click through to the contact to be able to call them about the opportunity.
*This post is locked for comments
Hi,
You could create a mobile phone number field in opportunity form and populate this field as the contact changes. You could register the following Javascript function on change of the contact field in opportunity form.
function RetrieveParentContactDetails() { debugger; var EntityId, LookupFieldObject; LookupFieldObject = Xrm.Page.data.entity.attributes.get('parentcontactid'); if (LookupFieldObject.getValue() != null) { EntityId = LookupFieldObject.getValue()[0].id; var cols = "mobilephone"; XrmServiceToolkit.Rest.Retrieve( EntityId, "ContactSet", cols, null, function (result) { Xrm.Page.getAttribute('OpportunityFormMobileFieldName').setValue(result.MobilePhone); }, function (error) { console.log("failed"); }, false); } }
Also, register the XrmServiceToolKit.js library on change of the contact field.
Hope this helps.
Another way is to create a Mobile Number field on Opportunity and populate the field when Contact is populated by using Javascript.
Hi,
The best way would be to create a Quick View Form on the Contact entity.
You could then add link this Quick Create form on the Opportunity form using the Contact lookup
Regards
Bharat
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,432
Most Valuable Professional
nmaenpaa
101,156