research

Displaying N-depth Parent Hierarchy in sObject Field

Abstract

The goal of the project was to find a solution to display identification numbers of parent record hierarchy in Salesforce Custom Object text field. The requirement was that the depth of record hierarchy is not fixed and the number of characters used in field is the maximum character number of the longest available text field. Project development environment was Salesforce, which is the leading CRM-software. Development was managed in Developer Edition sandbox and data model followed Salesforce model. Configuring object to track n-depth hierarchy is not common, therefore, the aim of this study was to do a research on issues related to n-depth Object hierarchy. Firstly, each possible event for record was designed to a chain of events. After the first phase, restriction in Salesforce environment was discovered based on what problems the project might face. The discovery phase excluded approaches, but also brought up restrictions that cannot be avoided and thus, need to be noted when developing. The third phase was to build a Process for each chain of event. Development for Autolaunched Flow followed, since Process needs to launch a Flow to complete record update. A clear and reliable solution was sought when developing a Flow. The last part of the solution development was Apex Trigger for event when the record should be deleted. The purpose of the Trigger was to delete the connection between record and its child records and then update the child records. A previously built Process was utilized when updating child records. As a result of this study, a solution which meets the core criteria of the project was found. However, some risks were detected, which denotes that the solution might not apply to a larger scale. The solution discovered can be optimized and improved, though. The project was made for a software start-up company, which is focused on developing Salesforce applications.Insinöörityön tavoitteena oli löytää ratkaisu esittää itseensä viittaavan Salesforce-objektin tekstikentällä datahierarkiassa ylempien tallenteiden identiteettinumerot tekstimuodossa. Vaatimuksena oli, että hierarkian tulee olla rajaamaton ja rivin merkkien määrän suurin sallittu. Toteutusympäristönä oli Salesforce, joka on johtava asiakkuudenhallintajärjestelmä (customer relationship management, CRM). Kehitysympäristönä toimi Salesforcen Developer Edition, ja datamallinnus on Salesforcen mallin mukainen. Salesforcen ympäristön objektin konfigurointi rajaamattoman syvyiseen hierarkiaan ei ole tavanomaista, joten tämän insinöörityön tarkoituksena oli selvittää, kuinka ratkaista siihen liittyvät käyttöongelmat. Ensin projektissa suunniteltiin jokaiselle objektiin liittyvälle tapahtumalle, kuten luomiselle, poistamiselle ja päivittämiselle, vaatimusketju. Seuraavana vaiheena kartoitettiin ympäristön rajoittavat ominaisuudet, jotka voivat haitata ratkaisun löytymistä. Kartoituksen tavoitteena oli sulkea pois lähestymistapoja, mutta se toi myös esille huomioon otettavia rajoituksia, joita ei voitu välttää. Muun muassa tietokannan hakuihin ja toimintoihin liittyi paljon Salesforcen asettamia rajoituksia. Kartoituksen jälkeen kehitettiin Salesforcen Process Builder -työkalulla tapahtumaketju jokaiselle objektin tapahtumalle paitsi tallenteen poistamiselle. Seuraavana oli vuorossa automaattisesti käynnistyvän kulun kehitys sille, kuinka tallenne päivitetään ajantasalle. Kulkukehityksessä pyrittiin selkeään ja luotettavaan tulokseen. Viimeisenä vaiheena oli luoda Apex-käynnistin tallenteen poiston tapahtumaketjulle. Apex-käynnistimen tehtävänä oli poistaa yhteys alemman kerroksen tallenteiden ja poistettavan tallenteen väliltä ennen tallenteen poistamista. Insinöörityö tuloksena syntyi toimiva ratkaisu, joka vastasi projektin päätavoitetta, eli objektin tekstikentälle pystyi luomaan tallenteen ylempien tallenteiden identiteettinumerot. Ratkaisussa huomattiin kuitenkin riskejä, kun tallenteiden määrä oli suuri tai hierakia oli rakennettu syväksi. Löydettyä ratkaisua on mahdollista vielä kehittää paremmaksi riskien vähentämiseksi sekä tapahtumaketjun kulun nopeuttamiseksi. Insinöörityön oli tilannut ohjelmistoalan start-up-yritys, joka on painottunut Salesforce-sovelluksen kehitykseen

    Similar works