Show specific entities in Activity Party List Lookup in D365 Activity entity

Out-of-the-box, D365 Activity Party List field, say, Appointment’s Required/Optional Attendees fields lets you choose among multiple Activity Party enabled entities when you want to select records. And perhaps you don’t even want users to select what’s not relevant.

default

Let’s look at how we can show only the required entities in the selection list.

Before that, if you want to check how you can enable custom entities for the Activity Party, you can refer this post of mine – Enable entity for Party List selection in Appointment

Hide entities from the Activity Party List field

This can be achieved by writing a simple JS code and calling it onLoad of the Appointment form where the Party List field exists.

  1. Let’s say you only want to show the entities Lead and Contact in the Required Attendees Party List field
  2. Here’s the JS code that goes on the onLoad function of the Appointment form
    // JavaScript source code
    oAppointmentFormCustomization =
    {
    filterRequiredAttendees: function () {
    Xrm.Page.getAttribute("requiredattendees").setLookupTypes(["lead","contact"]);
    }
    };

     

  3. And call the method filterRequiredAttendees onLoad as below
    onLoad
  4. The Appointment’s Required Attendees field will show only the entities you provided in the setLookupTypes([“lead”,”contact”]);
    filtered

Hope this helps!

Advertisements

Use Read-Only grid among Editable Grid enabled entities in D365

When you enable Editable Grid for an entity, all the public views become Editable Grids, correct?

And if you wonder if you can keep certain grids as Read-Only and the rest as Editable, your assumption is correct. Here’s what this blog is about.

You can still go back and select a particular grid which you want to keep as a classic Read-Only grid

  1. Let’s say you have added the Editable Grid under Controls. This will apply Editable Grids for all the Views on that entity.
    enabledEditable
  2. And you want Vendors view, for example, to show the classic Read-Only grid, open it up.
    vendorView
  3. Select Custom Controls.
    customControls
  4. And force-add another Read only grid even if it says the Default one is already selected.
    forceAddRead-Only
  5. Save and Publish you changed and check
    classicGrid
  6. And the rest of the grids will continue to be Editable Grids
    editableOthers

Note: I tried this on the Unified Interface and this works. Somehow, it didn’t work on the Classic Web UI.

 

Hope this helps!

Get SharePoint Document Location link on field on create in D365

I’ve been working on getting the SharePoint Document’s link to get back into D365 but looks like it can’t come back and get tagged to the record it was created from.

I tried to fire off a plugin on SharePoint Document record create, but in vain. Flow didn’t do justice since SharePoint Document entity doesn’t support Change Tracking.

So, I retrieved the Absolute URL of the “SharePoint Document Location” entity on it’s create itself so that I have the link once the record is created. And click that link to open the folder in SharePoint.

Workflow to wait and then fetch

So if you immediately make a call to retrieve the Absolute URL in the plugin code you’ve written on Create won’t work because Absolute URL gets created moments after the actual Location record is created unlike being passed in the execution context.

My approach is to fire the workflow on the create of the SharePoint Document Location record and Wait for 1 minute.

wfBody

After 1 minute, set off the flag to call the plugin and fetch the Absolute URL as shown below –

updateFlag

Retrieve Absolute URL in Plugin

You can use RetrieveAbsoluteAndSiteCollectionUrlRequest message to retrieve the SiteCollection URL and the Absolute URL of the document folder of the record

retrieveAbsolute

 

Working

  1. When you open the Document sub-grid on the record for the first time, a Document Location record is created –
    openForFirst
  2. The workflow designed above will run and fire off the plugin after 1 minute. The plugin will then make the message request go through to get you the Absolute URL as below –
    link2
  3. And probably you can use that link to open up the folder by clicking on the field that has this URL or send it across in email to internal users (whatever suits your requirements)
    linkInField
  4. It will open up the SP folder for that record and will have all the documents you attach in the Document sub-grid on the record.
    spFolder

Hope this helps!

D365 Quick Tip: Shortcut to Settings from the Unified Interface

If you’re spending time looking and wondering that you always need to go to the app switcher to go the Settings from the Unified Interface, you need to do the following –

Once you are in the Unified Interface, click on the Gear icon next to the help icon on top-right corner as shown below and click Advanced Settings

advancedsettings

 

Right on the next tab, Settings with the classic UI is shown –
fullsettings

And there’s nothing else on that SiteMap.

 

And that’s it! 🙂

 

Delete Async Plugin Logs if plugin succeeds, save D365 storage space

Let’s see how we can efficiently manage D365 storage without bloating the storage with data that you might not need.

In my opinion, we don’t really need to know that the background process was successful or not, we typically care for what failed.

So, from an Asynchronous plugin standpoint, the logs in D365 is registered in the System Jobs and they create a ton of System Events if you are Importing data in D365 and your Async process is on the create of such records.

sysjobs

Check your Async plugin step

  1. Now, you can preserve this storage space by choosing to Delete the Async plugin logs.
  2. In the screenshot below, you can see an option to ‘Delete AsyncOperation is StatusCode = Successful
    deletelog

In this case, the System Jobs for the will not be created, thus, saving you valuable storage space if your plugin is run frequently.

Hope this helps.

Enable entity for Party List selection in Appointment

Out-of-the-box, you have fixed set of entities enabled for Party List fields in Appointment entity. Of which, you can select to be either in Required or Optional fields on Appointments.

But, what if you want to enable a custom entity for the same? You can do that was well.

Enable Entity for Sending Email

  1. In your custom entity, you can turn on Sending Email option on the entity level and the entity will be enabled for Party List.sendingemails
  2. And Publish your customization.
    Now, when you select the Required/Optional field in Appointment, Look for More Records
    lookForMoreRecords.png
  3. Select the Look For option to expose available entities
    expandlookfor
  4. And look for the custom entity you created i.e. Office Representatives my this case.
    selectentity
  5. And select the record you want
    jamieg
  6. And the custom entity record will be added to the Party List field
    addedtolist

The reason your see them enabled is because Email Address (emailaddress) field has been created for the entity i.e. the entity is now Email enabled.

Hope this helps!

Quickly use Email Signatures in D365

You can use Email Signature in D365 Emails as well. Here’s a quick tip on it to quickly create a Signature and use it.

As I write this blog, this feature is not yet available in the Unified Interface yet.

Create a Signature

  1. Navigate to Settings > Templates > Email Signatures
    insertsignaturefeature

  2. And create a New Signature as below
    newemailsignature
  3. Now, I save and close.
    emailsignaturesaved

Insert and use Signature

Now, when you write a new Email or this email in D356, you can select the signature as below –

  1. Select Insert Signature while working on the email
    insertinemail
  2. Select the Signature and click Select.
    selectsignature
  3. And the Signature appears.
    finalsignature

That was easy. 🙂