Tuesday, July 17, 2018

sObject Convertor - A utility application to convert records from one sObject to another


What is sObject Convertor ?

Recently, SFDC Stop crossed 100 Subscribers on Youtube. Thank you everyone for supporting and encouraging me to do more for the community. As a gift to all, I have made a utility application - sObject Convertor using which you can convert records from one sObject to another. 


How can I install sObject Convertor ?

Follow these steps to install sObject Convertor application in your own salesforce org:- 
  • Go to the deployment section of the github repository and click on Deploy to Salesforce button which looks like this:-
  • You'll be taken up to the github salesforce deploy tool. Click on Login to Salesforce button on the top right corner.
  • The tool will ask for permissions, click allow.
  • After giving the permissions, you'll have a screen like this:- 
  • Click on deploy button in the top right corner and all the code will be deployed directly to your salesforce org.
  • Now, go to your org homepage or any detail page where you want to embed this app as a lightning component.
  • Click on the Settings (gear) icon and click on Edit Page.
  • Search for lightning component named SObjectConvertor in the left search box.
  • Drag and drop the SObjectConvertor lightning component to your page layout.
  • Click on save and click on assign as org default (if needed). Click on back button, left from the top right corner and you'll be back to your page with the lightning component embedded into it.

Instructions for using the application

  1. Choose the source object and the destination object.
  2. Search for the records of source object.
  3. Click on add record button as you search for each record to add the record in the list of records to be converted.
  4. To define the sobject mapping you have two options:-
    1. Create a new mapping:- In this case, you have to manually click add row for each field in which you have to map a field of source sObject to a field of destination sObject.
    2. Choose an existing mapping:- In this case, you can choose the previously saved mapping and the field mapping rows will be auto populated.
  5. If you have created a mapping, you can save that mapping by clicking on Save Mapping button and then giving the name of mapping in the dialog that appears. This mapping can then be used in future.
  6. Click on convert records button.

Your records will be converted and there are two different sections for success and failures. In the success section, you'll have the ids of the source and the destination sObject records. Whereas in the failure section, you'll have the id of the source sObject record with the particular error message due to which that record is not converted.

No comments:

Post a Comment