Skip to Content
User Experience Insights
Author's profile photo Eugene Fourie

Create a custom MDF Object with multiple records

Hi all

 

Today I will be discussing how to create a custom MDF Object that allows you to create multiple records with effective dates.  The use case I recently had was where a custom MDF is required to capture qualifications, since the background element doesn’t provide me with the functionality I need, like field level override permissions among others.  I am also then able to leverage workflows and require attachments for qualification records with the solution at the end of the day.

In terms of the solution, TWO custom MDF objects are actually needed.  One parent custom MDF {let’s call it Qualification}, that basically acts as a holder for the multiple child records, which is the second custom MDF {I have called it Add Qualificaiton} with the various fields and picklists that make up the entry.

As a note, you only need to create a custom UI for the Parent Object.  With this custom UI created, you can now go to Configure People Profile and add the Live Profile MDF Information block.

Since I have a need for multiple qualification records to be added (like a high school certificate, a diploma, doctorate, etc.), I have configured the Associations on the Parent MDF, with One to Many multiplicity and my second MDF Object as the Destination.

I also only secured the Parent Object since it is not possible to create child entity records either in the People Profile or via Manage Data.

Lastly, I also created a workflow for approval and added it only to the Parent Object’s Save Rules.

The intended consequence is that I can now add multiple qualifications on different effective dates to an employee’s profile, and they trigger a workflow for approval.  Each new effective dated record will also have a unique number, since I have set the externalCode as “Auto Number” Data Type on my child entity.

Trust you would find this helpful, and as always, feel free to comment, correct or ask questions if you need assistance to make this solution your own.

Assigned tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo hubert cieplak
      hubert cieplak

      Hi Eugene,

       

      I'm now following an almost identical approach, however when I save the data it updates all child entries. Are you aware how this can be avoided?

       

      Hubert

      Author's profile photo Eugene Fourie
      Eugene Fourie
      Blog Post Author

      Hi Hubert

       

      Each time you add a new effective date entry, the previous child record will still be there.  So if the child entity is no longer applicable, you can Bin it, or keep it there with a new child record.

       

      You mention that it updates all child entities - in what way?

      Author's profile photo hubert cieplak
      hubert cieplak

      Hi,

       

      in our case we need to have child act independently - we need to track "progress" for each one and for this we are "progressing" the status every time you save data. This is done at the child object with a rule. But as stated above child object are not handled separately and "save" will "update" all of them.

      I was looking for a solution but seems that only workaround is possible (potentially a very complex rule may also do the trick but we want to avoid that path)

      Hubert

      Author's profile photo Eugene Fourie
      Eugene Fourie
      Blog Post Author

      You could try amending your rule, that it only applies to the new child entity.  Is your externalCode set to Auto Number?  If so, you can add If externalCode = null into your rule, since the external code for the child record only gets created when you save.

      Author's profile photo hubert cieplak
      hubert cieplak

      Hi,

       

      good idea however it's only part of the solution. We have multiple steps/statuses (in some cases six of them). Potentially we can also track previous value and value but we actually want to avoid complex rules here.

      Author's profile photo Eugene Fourie
      Eugene Fourie
      Blog Post Author

      Just throwing another idea out there - you could try and use Integration Centre to update some of the child entities.

      I have a scenario where I assign a validity date, and based on the Integration Center comparing the validity date to current date when it runs, it updates my status from Completed to Archive if the Validity Date has passed, and does not change the status of the child records that have a validity date in future.

      Although not visible, I have the first effective date record in 2010 (with a three-year validity), and after the IC run, both the effective date entries for the child record that was effective until 2013 are now indicated as Archived.