Creating Contacts from other Apps

If a custom app offers the option for a new contact to be created, the Contacts app will not redirect the Method user back to the custom app after the contact is created. Furthermore, the custom app will not know the Record ID of the newly created contact.

Solution:  The Contacts app will check for a shared result called resultGoBack. If this is set to be of type "Yes/No" and the value is equal to "Yes", on completion of a newly created contact, the Contacts App will go back to the calling app, and it will store the Record ID of the new contact in a shared result called resultContactRecordIDfromNewContact.

Details

You do not have to customize the New Contact screen at all. If the shared result resultGoBack is set to "Yes", the New Contact screen will look for this flag and follow these steps:

  1. Hide the "Save & New" button
  2. Clear the shared result resultGoBack
  3. On Save, the user is taken back to the screen that the user came from (your screen)
  4. The record ID of the newly created contact is stored in the shared result resultContactRecordIDfromNewContact

Example

In this example, a Custom App has a drop down to choose a contact. In the drop down, there is custom row to Add/Edit a contact.

  1. In the event "Custom Row Click" of the Contact dropdown, we use the action "Assign Value to Shared Result" to set the shared result resultGoBack to "Yes". Make sure the type is "Yes/No".
  2. In the screen's properties, you will need to add a few actions to the "Focus" event. The record ID of the newly created contact will be stored in the shared result resultContactRecordIDfromNewContact
    1. Check conditional statement: resultContactRecordIDfromNewContact is not empty
    2. If above statement is true, update dropdown control with resultContactRecordIDfromNewContact
    3. Clear resultContactRecordIDfromNewContact else you may cause unexpected bugs
    4. Call Change Event of dropdown control if it has actions when a contact is selected

[top]

Was this article helpful?

Can’t find what you’re looking for?

Contact Us