Monday, April 3, 2017

Lightning Component for RecordType Selection Screen for any Sobject

I have created a lightning component which can be used to display recordtype selection screen to user. You can just specify the object API name as an attribute and it will display the active recordType for that object.

Below mention code implement the concept of passing inner wrapper class to lightning which was mentioned in my previous blog  Passing Inner Wrapper Class to Lighntning Component.



Below is sample code for this.

Click to Download Complete Code


More Blogs>>: 
DYNAMICALLY CREATING AND DESTROYING LIGHTNING COMPONENTS    
RAISING AND HANDLING CUSTOM EVENTS IN sALESFORCE lIGHTNING    
WHY TO USE DESIGN RESOURCE AND HOW TO ADD DYNAMIC OPTION TO DATASOURCE    
PASSING INNER WRAPPER CLASS TO LIGHTNING COMPONENT
Hope this will help !!!!

2 comments:

  1. can you let me know how you are defaulting a radio button inside the aure iteration

    ReplyDelete
    Replies
    1. Inside doInit controller function, I am setting the selectedRecordtype by using below code:
      component.set('v.selectedRecordType',jsonObject[0].recordTypeId);

      Here I am defaulting it to first record in jsonObject array.

      Thanks.

      Delete