• thomas richard 5
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I need to be able to call the Rest UI API from inside of APEX for an app exchange package.

Right now I am able to set up a callout that I can set up from inside of my development org using the Connected app, Auth. Provider and Named Credential, but this solution only works in my development org, I need to be able to make UI API calls from inside of our app exchange package.
I have a lightning app which has the remote site settings dynamic.
So, is it a good practice to use metadataService.class (http://technome2.blogspot.com/2017/05/creating-remote-site-settings.html) in post-installation script to add remote site settings for the org?
I am not an expert in lightning components, so I had to post this question.

In lightning, I have an app page. There a is a primarycomponent kept on the lightning page.

PrimaryComponent.cmp
----------------------------
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"
                access="global" >
 <lightning:button label="Neutral" 
                             title="Neutral action" 
                             onclick="{!c.handleF1Comp}"/>
</aura:component/>

Now I have another component say F1Comp.cmp

<aura:component implements="flexipage:availableForAllPageTypes"
                access="global" >
 <h1> I am F1 Comp </h1>
   </aura:component/>

My requirement is when I click the button In primarycomponentit should call the f1Comp.

How to achieve this?

Please eloborate and suggest approaches.
Thanks
shwet