Sage CRM for iPhone - Adding Custom Entities

The Sage CRM Blog

Articles of general interest about Sage CRM, the community, add-ons and general news!

Sage CRM for iPhone - Adding Custom Entities

  • Comments 10
  • Likes

Many people are asking us if it’s possible to add your own custom built entities to the iPhone. Well, the good news is you can!! Below is an example of exactly what needs to be done. Remember, to create a custom entity for use on your iPhone, you would firstly create your new entity using the new entity creation wizard.

In this example I wish to record and monitor my company car information within CRM. I would like to be able to add and edit my cars using the iPhone. I also want to perform searches on cars using the iPhone.

I have created a custom entity called ‘Car’ and added the following fields:

  • Make – Selection – (Audi/BMW/Ferrari)
  • Model – Text
  • Registration – Text
  • Mileage – Number

 

 

Before adding the car entity to the iPhone,  I have edited my screens so that they contain the fields I want to see on each screen. 

Ensure that when you’re adding your fields to the screens that you remember to switch your devices to ‘iphone’. 


Adding your new Car entity to the iPhone

There are a number of steps involved in adding a new custom entity to the iphone. The Summary Screen must be contained within a Block which in turn must be contained within a Tabgroup which in turn must be linked to from a grid.

Step 1 –  Create a new container Block and Add your car summary screen to the block.

  • Navigate to  Administration – Customisation – Car – Blocks Tab
  • Select ‘New’.
  • Give your new container block a name and choose ‘Container Block’ as the block type.
  • Choose ‘Save’.

Customise your new block 

  • Select ‘CarSummaryScreen’ from the ‘Use Screen Drop’ down option and select ‘Add’ so that the Car Summary Screen is added to the Block Contents.
  • Choose ‘Save’.


 

 

Step 2 – Add your container Block to the Car tab group.

  • Navigate  to Administration – Customisation – Car – Tabs.
  • Ensure that IPhone is selected under devices.  Choose ‘Customize’.

  • Change the action under Car Summary to ‘runblock’ and enter ‘CarSummaryBlock’ under block name so that CRM knows to use the CarSummaryBlock that we created in step 1.
  • Choose ‘Update’ first, then choose ‘Save’.



 

Step 3 – Link to the newly edited tab group from the car grid.

  • Navigate  to Administration – Customisation – Car – Lists.
  • Ensure that IPhone is selected under devices.  Choose ‘Customize’ on the ‘CarGrid’.



  • Ensure ‘car name’ is highlighted to the left of the screen. On ‘Hyperlink to’ choose ‘Run Tab Group’.
  • Ensure that the Tab Group Name is ‘Car’ and the Custom Id Field is ‘Car_carid’.
  • Choose ‘Update’ first and then choose ‘Save’.





 Step 4 - Add the car entity to the ‘new’ and ‘find’ system screens on the iphone.


  • Navigate to administration – advanced customisation – system menus.
  • Ensure IPhone is selected under devices.
  • Select the ‘find’ hyperlink from the list.
  • To the right of the screen enter ‘Car’ for the Caption.
  • Choose ‘runblock’ for the Action and enter the block name as ‘carsearchbox’.
  • You can also enter a bitmap image of the car at this stage if you like.
  • Choose ‘Add’ and then choose ‘Save’. This will add the Car to the Find menu on your mobile device.


 


  • Navigate back to administration – advanced customisation – system menus.
  • Again ensure IPhone is selected under devices.
  • Select the ‘new’ hyperlink from the list.
  • To the right of the screen enter ‘Car’ for the Caption.
  • Choose ‘runblock’ for the Action and enter the block name as ‘carsummaryblock’.
  • As before, enter the image name of the car, e.g. car.gif.
  • Choose ‘Add’ and then choose ‘Save’. This will add the Car to the New menu on your mobile device.


 

  • Don’t forget to add your own entity image(e.g. car.gif)  to your wwwroot\themes\Img\’your theme’\menu folder for each of your themes!

 

Now let's see what it looks like on our iPhone!

 

Let’s say we want to add a new car that we purchased for one of our employees using our iPhone.

We navigate to the new menu on our iPhone and we can see our new car icon. We would enter our details and then click save. We are now taken to the summary screen of the Car where we can make changes by clicking on the change button if we so wish and then saving the changes.

       

 

We now want to know what company cars are in the system by doing a search. Navigate to find menu from on the iPhone and again we can see our ‘find car’ icon. You can filter the search by any of the criteria that you’ve added to the search screen. In our case we want to see all cars so we would simply choose ‘find’.

      

 

We can see the details of any of the cars listed by selecting that car. This will bring us to the summary information for that car and from here we can change details if we so wish.

       

 

Remember it's completely up to you what fields are added to your new entity.  For example you might want to record things like the date of purchase or the size of the engine or the fuel type.

 

Comments
  • Hi Aoife

    good work and example.

    Christian

  • Thanks Christian.

  • HI Aoife,

    Nice article - very clear and well explained.  I'll be passing this on to a couple of our developers who've been asking about this.

  • Hi Aoife, this has worked fairly well, except for the presence of a search select advanced field linked to the companyid in my custom entity. This is causing a "field Comp_CompanyID not found" error when clicking on the search result (which should bring up the entitySummary screen), and when trying to add a new entry, it is impossible to select the desired company. Is there anything that can be done for this on the iPhone?

  • Hi Kevin,

    Search Select Advanced Fields are not currently supported on the iPhone as they do cause issues however we will be taking the iPhone component out of beta and releasing it out of the box with CRM 7.1 in March and SSA's will be supported.

  • Hi Aoife,

    Well written article.  I think this will be very useful to quite a few of our developers in the near future.

  • Wonderful work. many

    thanks

    Raul Perez

  • Great works. How to add more tabs to iphone summary screen of custom entity

  • hi, its very interesting blog. I am trying to show a report using  CustomDotNettDll rather than RunBlock.

    It shows newly created  tab on iphone but does not brings up results for that  list  although it works fine on DeksktopHTML but not on iphone.  is it possible to to show lists on iPhone created by CustomDontNetDll ??

    I would appreciate if you could help please.

  • HI

    In my screen I use multiple JS, and some works on the mobile and some doesn't. for example auto calculated field doesnt work.