-3

I am new to CRM. I have a requirement where I have an "account" entity and a "contact" entity. In contact form I have a lookup field for searching account name which is stored in account entity. When I select an organization through lookup, the contact number of that organization should be fetched and saved in another field in contact form. I need to do it with fetch XML.

Bunny
  • 1
  • 1
  • Why does it need to be done with FetchXML? This would be possible to do with a BPF. – Jonas Rapp Sep 24 '17 at 17:12
  • Yes Jonas I can do it with BPF or even workflows. I have done it using javascript oData. But now the requirement is to be done with fetchXML – Bunny Sep 25 '17 at 03:16
  • Is this 2016 or later ? FetchXML should be left behind to rot, WebAPI is there now to make our life easier and our code work better. The only answer I can come up with is "tell your boss to stop wasting your time with FetchXML". More seriously: SOAP endpoints are going to vanish and only the WebAPI will stay, so it's not worth the effort. – Alex Sep 25 '17 at 09:27
  • You can still use FetchXML with the WebAPI endpoint... ;) – Jonas Rapp Sep 25 '17 at 18:38

1 Answers1

-1

Option 1: You can do a no-code solution by mapping fields between account & contact.

enter image description here

Option 2: If you don't want a physical copy of field value in both entity, use Quick view form of Account lookup to just display the fields in contact without storing redundant data.

Option 3: If you still want to store the value onchange of account, retrieve it & set it in contact field. This step by step guide will help you to build fetchxml & use it in JS. Your question doesn't say if you are stuck in query or any error.