async function hideHomePageCancelBtn(firstSelectedItemId) { debugger; const activity = await Xrm.WebApi.retrieveRecord( 'activitypointer', firstSelectedItemId, '?$select=activitytypecode', /?$expand=appointment($select=ownerid)/ ); const isAptType = activity['activitytypecode']; const owner = appointment['ownerid'] if (isAptType === appointment) { if (owner === 'Portal User') return true; } else { return false; }}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,469 Most Valuable Professional
nmaenpaa 101,148