How do I manage the default address source for service work orders?

Here are instructions on how you can change, add, or remove default sources from the list of values in the work order layout such as not allowing one-time addresses.

The address source can be based on the asset, service profile, account, contact, or a one-time address for the service request and work order. By default, the address source is set to asset.

Here's how you change the default to be based on service profile and remove the one-time address from the list of available sources:

  1. Open the Oracle CX Service UI Extension App template in Visual Builder Studio.
  2. Choose the Layout Section icon.
  3. In the Dependence tree, find CustomerWorkOrders in Oracle CX Service UI Extension App.
  4. Select CreateForm in the Dynamic Form section.
  5. Select the Event Listeners tab.
  6. Click the + Event Listener icon.
  7. On the Create Event Listener page, click vbEnter.
  8. Click Next.
  9. Click Finish.
  10. Click vbEnterListener Go to Action Chain.
  11. Click Code and add these two lines in the following order:
    • $base.variables.addressSourceContext = {"ORA_SVC_ASSET_ADDRESS":true,"ORA_SVC_PROFILE_ADDRESS": true, "ORA_SVC_CONTACT_ADDRESS": true,"ORA_SVC_ACCOUNT_ADDRESS": true, "ORA_SVC_ONETIME_ADDRESS":false};
    • $base.variables.addressDefaultSource = 'ORA_SVC_PROFILE_ADDRESS';
  12. The following image shows how the action chain appears:

    Sceen capture showing the action chain code

  13. Test to verify Service Profile is defaulted after selecting a service profile.
  14. Open the Address Source to verify that the One-time address isn't displayed.