To restrict users from creating activities (meeting, chat, email, phone call) when the related contact is inactive, you can modify the provided JavaScript as follows:
Xrm.WebApi.retrieveRecord
.async
.try-catch
for error handling around the API call.This approach should prevent activity creation for inactive contacts and update the UI accordingly.
Daivat Vartak (v-9d...
181
Super User 2025 Season 1
Siv Sagar
149
Super User 2025 Season 1
Vahid Ghafarpour
124
Super User 2025 Season 1