Archive

Archive for March, 2015

Display Custom Entity on IPad or Windows 8 CRM App Home Screen

March 25, 2015 1 comment

I recently got a chance to work with CRM on Tablets. The requirement was to display a Custom entity on Tablets home screen. It’s very easy to achieve with below steps. Enable entity for tablets

  • I have a Custom entity ‘Change Of Address’
  • To enable this for tablets, Go to Customization and check ‘CRM for tablets’ check box
Enable entity for Tablets

Enable entity for Tablets

Getting Entity on Tablet home screen

  • By default ‘Sales Dashboard’ will get displayed on Tablet Home screen
  • So to get ‘Change Of Address’ entity on home screen, I added ‘Change Of Address’ entity view to the ‘Sales Dashboard’. (Note : Only 6 sections of Sales Dashboard visible on Tablet home screen)
Customize Sales Dashboard

Customize Sales Dashboard

  • Once you publish the changes and reopen the CRM application those changes will take effect
Tablet - Sales Dashboard

Tablet – Sales Dashboard

Points to be noted while working with Tablets Form Limitations

  • We get the ‘Main’ form of the entity on tablet but with below limitations
    • Tabs cannot be expanded or collapsed
    • IFRAMES in forms are not displayed in CRM for tablets
    • Cannot switch between forms if the entity has multiple forms
Tablet - Customization Limitation

Tablet – Customization Limitation

  • We can differentiate scripts running on Web or Tablet with below check
if (Xrm.Page.context.client.getClient() != "Mobile"){
    //Code that should not run in CRM for tablets can be included here
}
  • All Custom entities can be configured to view on Tablet but not all OOB entities viewable on Tablets (Below are list)
Tablet - Entity Configuration

Tablet – Entity Configuration

Customization changes Sync between Server and Tablet

  • New Customization changes will take effect in Tablet on reopening of application also when its idle for more than 20 hours.
Tablet - Meta Data Sync

Tablet – Meta Data Sync

Unsupported SDK messages

  • Below are list of unsupported SDK messages on Tablet
Tablet - Unsupported SDK

Tablet – Unsupported SDK

Off line Support

  • CRM application data will be cached on HTML5 local store.
  • Attachments of Records are not available offline.
  • You cannot search data when offline.
  • Only visited records using tablet gets cached; for example the records which i never opened with my tablet won’t come up when offline.
  • Few more points
    • We can only create new records. To edit existing records, you need to be connected. You can edit records that you created while you were offline, however.
    • You can only create records offline with the Quick Create form, not the full form.
    • While disconnected, you can only create standalone records or associate records to those that are cached on your tablet for offline access. For example, you can create an opportunity for an account only if that account was created before you went offline and if it’s cached for offline access. You can’t create an account while offline and then create an opportunity for that account.
    • When you’re offline, you can’t set the value for lookup fields. If you create a record that is associated with another record, such as adding a phone call to a contact, some lookup fields might populate automatically (in this case, the To and From fields might pre-populate). You need to fill these fields in once you re-connect while you review and save your drafts.
    • Article Work Offline
Tablet - Offline Support

Tablet – Offline Support

Refer below MSDN resources for more details

🙂

Advertisement
Categories: CRM Tags: , ,

Executing Failed Workflow Async Jobs – CRM

In my CRM application we trigger workflows on creation of Orders.

Other day because SQL server was down, there were 600 System Jobs failed with ‘SQL Time Out’ error.

Once SQL server issue fixed we had the problem of fixing failed workflow jobs, Since I cannot re-execute the failed jobs from the CRM ‘System Jobs’ UI, only way is to create 600 Orders again which was tedious.

After exploring I came to know that we can re-execute failed ‘System Jobs’ using ‘ExecuteWorkflowRequest’ SDK message.

ExecuteWorkflowRequest SDK message requires

  • WorkflowId
  • EntityId

Sample Code – 

// Create an ExecuteWorkflow request.

ExecuteWorkflowRequest request = new ExecuteWorkflowRequest(){

WorkflowId = _workflowId,

EntityId = _OrderId

};

// Execute the workflow.

ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)_serviceProxy.Execute(request);

Refer article for source code and execution steps for failed jobs.

🙂