• Manish Choudhari
  • NEWBIE
  • 446 Points
  • Member since 2017
  • Salesforce System Architect
  • Salesforce.com


  • Chatter
    Feed
  • 15
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 75
    Replies
Hey Guys, 

is it possible to append a visualforce page to another one ? One page is just a text file. To reduce the lines of Code of the "real" visualforce page, i am looking for a way to merge these two pages. Is there a simple way to do this ? 

Greetings,
Sandra
This is one of the most common use cases, we want to setup a secure middleware user to access and create records in salesforce but using Oauth2 security. I need help in getting the right configuration set up.

Here is what I have done till now.
  1. Created a connected app using the Enable Oauth settings, and set the Oauth Scope.
  2.  Created an Integration Profile, with API Enabled and API Only user as true. Granted connected app access to this profie.
  3. Created an Integration user with this profile.
Step 1 has given me the client Id and Client secret, and Step 3 has provided the username - but it also sends an email with password to the user.
What is that I should be doing to follow the right practice ?
  • June 07, 2018
  • Like
  • 0

Hi folks,
could you please check and let me know any one have idea on this? and let me know is this requirement possilbe or not for Contact --->Acitivy history.
scneario 1:
1. when click on Subject link under Activity history , is it possible to open 'test' link under IVR Journy hisotory( please see below screenshot)?
is it possible ,if yes please let me know how can do it ?

User-added image

scneario 2 :
can i display IVR Jorney values under Activity History ?  in IVR journye i have total 10 fields, i need to add these 10 fields details to Acitvity history ? 
present, ivr journey details populating based on when a record inserted into IVR jouney object .
please check give any ideas how to do this?
  • June 07, 2018
  • Like
  • 0
Hi

I've been looking around but i have found nothing regarding this topic so far. In the lighting app builder, you can add global actions to your app pages. I know how to create your own global actions, but when i try to add a custom lighting component action, it just does not show up in the list (with all the other global actions i tried E.g. New Record, Visualforce Page etc. , it worked). Also, i can add the custom action to a publisher layout
My custom action lighting component looks like that:
<aura:component implements="force:lightningQuickAction,force:appHostable,flexipage:availableForAllPageTypes" access="global">

</aura:component>
Am i missing something, or is this simply not possible?
for ex:  for(Sobject sobj : Database.Query(sobjQuery)) 
Is there any other way to represent this?
Hello,

I just started learning. Sorry if my question is very basic but I was not able to find the answer to it.
I am trying to create a button that when clicked, a modal pops up with two buttons that each will create a separate message on the first page.
So far I created a new lightening component and I was able to create the button, but the thing is that I don't know how I can debug/run it so that I can see the button.
I went through multiple videos but I cuoldn't figure it out. I appreciate if someone can give me a clue.

Thanks! 
 
Why I am not able to see debug logs ?

after creating Level's and log.
This is how my detail log look like, 
am I missing something in my profile?
debug
I have created the custom object.My requiremenet is i need to change the vendor name . So when I change the vendor name i need to get a popup box with check box yes or No to select.

In my custom object ,I have edit option to change the Vendor name but when I save I need to get the pop up box with check box.So i need to overide this save option but in the object under button& link secton I m not able  to  see save button .so  how I can override the save  button  
for creating the popup box please suggest .Thanks in advance .
  • June 06, 2018
  • Like
  • 0
I wish to generate a URL in order to pass data from a thrid party connctor (Zapier) to SFDC. Does anyone know how I could generate such a URl from SFDC that could be query a REST API endpoint ?

https://zapier.com/help/how-get-started-webhooks-zapier/#using-the-retrieve-poll-trigger-option

The would be used to listne for changes in another application ?

thanks



 
Hello,

This is my first post, please help me on the below issue. 
There is a custom object which stores the Schedulable Apex Classes. Requirement is to create a Schedulable apex jobs for all of them using System.schedule method but it allows only instace of a Schedulable apex class as a input parameter, below is my code. Please advise how to create a dynamic instace for the sch.apex class which is available at run time in variable wa.Apex_Class__c.

QJobsList = [SELECT id, Name,  Job_Name__c, Apex_Class__c FROM Schedule_Apex__c ];
for(Schedule_Apex__c wa : QJobsList){
                wa.Apex_Class__c  Obj  = new wa.Apex_Class__c();  //This Statment is not working, Seems to be a dynamic assignment is required 
                    //Cron Expression
                    String sch = '0 0 0 '+ wa.Scheduled_Date__c.day() + ' ' + wa.Scheduled_Date__c.month() + ' ? ' + wa.Scheduled_Date__c.year(); //
            
                    System.schedule( 'Test job1' , sch , Obj);
}

If i can give write like this  TestSchApxJob  c = new TestSchApxJob();  //schedulable apex class name, there is no error but it's not possible 
I have googled this and found i can use something like below but still not able to understand. 
// Get the Type corresponding to the class name
Type t = Type.forName(cs.className__c);

Thanks in advance for your help,
Suman

      
                      
I'm currently using an Apex Class to generate a list of records owned by a specific User.
 
public TelemarketerDialing(){

        if(ApexPages.currentpage().getParameters().get('leadgenerator') == null)
                       {myParam = UserInfo.getUserId();}

        else{myParam = ApexPages.currentpage().getParameters().get('leadgenerator');}
        }

      public String myParam { get; set; }

I build a Visualforce page for Managers to basically click in to the list of any User using the Visualforce page URL of that individual LeadGenerator's page.
 
<td><a href="https://corere--c.na50.visual.force.com/apex/DoorKnockerPortal?leadgenerator=0056A000000f0af">Angel</a></td>

        <td><a href="https://corere--c.na50.visual.force.com/apex/TelemarketerPortal?leadgenerator=0056A000000e779">Antonio</a></td>

        <td><a href="https://corere--c.na50.visual.force.com/apex/TelemarketerPortal?leadgenerator=0056A000001IVgU">Ary</a></td>
I'm wondering if there's a way to user the UserID to display the name of the User you are viewing on the page.

Something like:
public String LeadGeneratorName = getUserInfo(myParam).UserName;
Is this possible?


 
Hi All, 
I have an input text on VF page. And I have a drop-down. If e.g. "Value1" is selected in drop-down then I need to type value to input text manually. But if "Value2" is selected then the value of  input text should be filled in automatically with some value. How can I do this second part?
Thanks!
I am trying to save this component
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable" access="global" >
    <c:auraMethod aura:id="child" />
    <aura:handler event="c:formsubmit" action="{!c.onFormSubmit}"/>
    
    
    
    <lightning:layout VerticalAlign="center">
        <lightning:layoutItem padding="around-small">
            <c:BoatSearchForm /> 
        </lightning:layoutItem>
    </lightning:layout>
    <lightning:layout VerticalAlign="center">
        <lightning:layoutItem padding="around-small">
            <c:BoatSearchResults />
        </lightning:layoutItem>
    </lightning:layout>
</aura:component>

 i have the error "No COMPONENT named markup://c:auraMethod found"

have you face this issue ?
 
  • March 13, 2018
  • Like
  • 2
Hi All,

Can anyone help me in wrting the test class with assert statement for the following code?
 
global with sharing class ResetPortalPassword{
    webService static String ResetPortalPassword(String userId)
    {
        System.ResetPasswordResult result = System.ResetPassword(userId,true);
        return String.valueOf(result);
    }
}



Thanks,
Anuj​
Hi Guys, I'm trying to display all the related contacts to all the related Accounts (Accounts are returned by a SOQL query when I input some name in VF Page nd it uses Like 'input%' ). But I'm getting Visualforce Error  System.NullPointerException: Attempt to de-reference a null object
Error is in expression '{!find}' in component <apex:commandButton> in page passingvaluestocontroller: Class.aaPage52.find: line 24, column 1 Class.aaPage52.find: line 24, column 1 . 

Here's My Code : 
VF PAge : 
<apex:page controller="aaPage52">
<apex:form >
<apex:pageBlock title="Search" >
<apex:outputLabel for="searchString" value="Enter the Search String : ">
</apex:outputLabel>
<apex:inputText value="{!searchText}" id="searchString"/>
<apex:commandButton value="Find" action="{!find}" />
</apex:pageBlock>
<apex:pageBlock title="Results">
<apex:pageblockTable value="{!results}" var="r">
<apex:column value="{!r.name}"/>
<apex:column value="{!r.Phone}"/>
<apex:column value="{!r.Industry}"/>
</apex:pageblockTable>
</apex:pageBlock> 
<apex:pageBlock title="Contacts Related to this Account">
<apex:pageblockTable value="{!Contacts}" var="con">
<apex:column value="{!con.FirstName}"/>
<apex:column value="{!con.LastName}"/>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

Controller : 

public class aaPage52 {
    List<Account> results;
    List<Contact> con;
    public String searchText { get; set; }    
    public List<Account> getResults() {
        return results;
    }    
    public List<Contact> getContacts() {
        return con;
    }
    
    public pageReference find(){
     results = [Select Name,Phone,Industry from Account where name LIKE :searchText+'%']; 
     If(results.size()!=0){
     List<contact> cont;
     for(Integer i=0; i< results.size(); i++){
       cont  = [Select FirstName, LastName from Contact where AccountID =:results[i].Id];       
     }
     con.addAll(cont);
     }
     update con;
     return null;
    }   
}

And Earlier when I didn't use con.addAll(cont); , I was able to Display the related Contacts  when Only one Account was returned by the Account Query. 


Appreciate your help.
Thanks,
Nitin Patil
I'm unable to create a new global action. When I click on New Action from Global Action, nothing happens. Please help
Hello, 
I have problem when I want to open my visualforce page 

Too many SOQL queries: 101 

Can you help me please.
  • June 08, 2018
  • Like
  • 0
Hi,

I'm trying to run a report that should validate as follows. The system isn't accepting it and I probably have it parsed incorrectly. Can someone take a look please?

(1 AND 3 (OR  2 (OR  (4 AND 5))) AND 6)
Hi All,
 
We have the following scenario. 
 
We want to have classic pages look like lightning in Napili Template 
 
1. In our approach we added an attribute called lightningstylesheets=true for visualforce page with a hope that the page will be automatically rendered with lightning styles in community, there comes a road block with Salesforce - 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm
 
 
We cannot use lightningstylesheets attribute in community
 
 
2. So as a work around we created a lightning app with the Visualforce embedded in it.
 
 
<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,forceCommunity:availableForAllPageTypes">
    <iframe src="https://xxxxx/apex/viewOrder?id=8011F0000009IbO" style="height:800px;width:1000px"/>
</aura:component>
 
 
After doing this we tried overriding the Standard View functionality of Salesforce
 
Even though we have given the SampleComponent as the override in Lightning Experience it is not working.
 
 
3. Apart from the limitation we faced in point.2 there is also a limitation in passing parameters via url within community.
 
 
Below is the link of Salesforce Idea
 
 
https://success.salesforce.com/ideaView?id=0873A000000CLheQAG
 
Please suggest what is the best way to implement this.
Hey Guys, 

is it possible to append a visualforce page to another one ? One page is just a text file. To reduce the lines of Code of the "real" visualforce page, i am looking for a way to merge these two pages. Is there a simple way to do this ? 

Greetings,
Sandra
Hello,

In "Lightning Components Basics", post "Create and Edit Lightning Components", there is a paragraph as below:
Indeed, the Developer Console has a number of features for working with Lightning Components. There’s also File | Open | Lightning Resources, which lets you open a bunch of Lightning resources all at once. Useful!
But in Developer Console, I cannot find "Lightning Resources" under "Open", instead it is File | Open Lightning Resources. Please update the post.
 
Hi All,

I have a custom bar chart written in VF page where we are dsipalying records based on controller. Currently we are displayng the values in generic way. But we want to display values differently based on user locale/country. For example the value shown to Indian user will be 1,00,000 but the same value shown to US user will be in the format 100,000. Kindly provide me solution.

Thanks,
Anuj

Hi Devs,

I had a requirement to fetch the external data and update back the response in saleforce system based on trigger action.
The design is as follows,
When zipcode field in opportunity is changed or populated ,the trigger calls the external api and passes zipcode value .
The external api returns state,city,country based on zipcode .
The external api just accepts 1 zipcode at a time .
The design is implemented and working fine when opportunity is changed from UI .
Since there could be many opportunity getting updated/updated in bulk  , I have enclosed a HTTP.send(req) in for loop .
If there are more than 100 records getting updated , more that 100 callouts gettting called in single transaction and will throw callout limit exception .

Any better design to avoid the error and functionality works fine even for bulk data.
  • June 08, 2018
  • Like
  • 0
This is one of the most common use cases, we want to setup a secure middleware user to access and create records in salesforce but using Oauth2 security. I need help in getting the right configuration set up.

Here is what I have done till now.
  1. Created a connected app using the Enable Oauth settings, and set the Oauth Scope.
  2.  Created an Integration Profile, with API Enabled and API Only user as true. Granted connected app access to this profie.
  3. Created an Integration user with this profile.
Step 1 has given me the client Id and Client secret, and Step 3 has provided the username - but it also sends an email with password to the user.
What is that I should be doing to follow the right practice ?
  • June 07, 2018
  • Like
  • 0

Hi folks,
could you please check and let me know any one have idea on this? and let me know is this requirement possilbe or not for Contact --->Acitivy history.
scneario 1:
1. when click on Subject link under Activity history , is it possible to open 'test' link under IVR Journy hisotory( please see below screenshot)?
is it possible ,if yes please let me know how can do it ?

User-added image

scneario 2 :
can i display IVR Jorney values under Activity History ?  in IVR journye i have total 10 fields, i need to add these 10 fields details to Acitvity history ? 
present, ivr journey details populating based on when a record inserted into IVR jouney object .
please check give any ideas how to do this?
  • June 07, 2018
  • Like
  • 0
Hi

I've been looking around but i have found nothing regarding this topic so far. In the lighting app builder, you can add global actions to your app pages. I know how to create your own global actions, but when i try to add a custom lighting component action, it just does not show up in the list (with all the other global actions i tried E.g. New Record, Visualforce Page etc. , it worked). Also, i can add the custom action to a publisher layout
My custom action lighting component looks like that:
<aura:component implements="force:lightningQuickAction,force:appHostable,flexipage:availableForAllPageTypes" access="global">

</aura:component>
Am i missing something, or is this simply not possible?
for ex:  for(Sobject sobj : Database.Query(sobjQuery)) 
Is there any other way to represent this?
Hello,

I just started learning. Sorry if my question is very basic but I was not able to find the answer to it.
I am trying to create a button that when clicked, a modal pops up with two buttons that each will create a separate message on the first page.
So far I created a new lightening component and I was able to create the button, but the thing is that I don't know how I can debug/run it so that I can see the button.
I went through multiple videos but I cuoldn't figure it out. I appreciate if someone can give me a clue.

Thanks!