0

Recently we have migrated our instance into Lightning, in the process of stabilizing we came across issues with JavaScript buttons which we are using in classic mode.The logic we are keeping in this button is we are using this button as detail list button on a parent object , so if someone clicks on this button from the parent record layout's child related list section automatically a child record will get created through java-script and the window will be redirected to the new child record.

Some of the options we are seeing to replace these java-script buttons in lightning are below

  1. Quick actions in lightning
  2. Actions of type executing Lightning component

    Unfortunately these tow options are not helping us much as we are not able to place these actions as list button on parent record, these are working only on child detailed layout. But we want to place this as the list button on the parent layout.

Another option is:

  1. Create a button of type list button and action is to execute a VF page.

    This looks to be ok , but here also we ran into a problem - as we are creating this button on child object with a standard controller, but performing click action from the parent record, the id that is coming by default is a parent id which is very much needed for us , but unfortunately the page is failing with an error

    Id value a0I4D00445001LCt is not valid for the Child_Object__c standard controller.

Is there any workaround to create a list button in lightning for this scenario??

  • why can't you use the "create a record" object specific quick action ? these actions shows up on the parent record in the action bar and helps you create the child records that gets auto linked to the parent record. – Vamsi Krishna Apr 3 '17 at 7:22
  • @VamsiKrishna Thanks Vamsi, but i cant keep this action as a List button on child related list which should reflect from Parent page.We are trying to simulate same user behavior in classic where user can create this child record by clicking this action on the related list button – rajasekhar Apr 3 '17 at 7:25
  • 1
    I understand.. but we should not encourage like to like transition from classic to lightning and need to get users trained on the new UI navigation & experience. with the quick action, you are saving them to go to the related list section and giving the option to quickly create a child record from the parent record home page.. – Vamsi Krishna Apr 3 '17 at 7:35
  • @VamsiKrishna Thanks Vamsi , that's a good suggestion – rajasekhar Apr 3 '17 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.