Prakhar Chauhan
IndividualForum Replies Created
-
Prakhar
MemberJune 13, 2016 at 2:12 pm in reply to: How can we integrate Salesforce with Conga Composer?Hii Ajit,
You can install Conga Composer directly from AppExchange with your Salesforce Username and password as you install other apps.
If you want to Conga Composer to interact with your data with Salesforce you need to enable security settings.
- To give access conga composer access to user profile you need to enable API Enabled settings.
- If you want to use Salesforce Reports as a data source for Composer then enable “Run Reports” and ‘Export Reports” for the desired user profile.
Hope that will help you out.
Thanks.
-
Prakhar
MemberJune 13, 2016 at 1:55 pm in reply to: How to import lookup relationship data from sandbox to prod in Salesforce?Hii Himanshu,
If you want to import the data which is related to the other object such as an Lookup or an Master Detail relationship then in that case you can go through the following steps:
First create the external id field on the parent object which can be marked as unique according to the requirement in the destination org.
Import the data for the parent in the destination org using data loader and map the id of the record with the external id field.
Then Upsert the data for the child object into the destination Organization using Data Loader. In Step 2a of the Data Loader, select ‘ID’ as the field to use for matching child object. In Step 2b of the Data Loader, select the field created as an external id as the field to match the parent object. In the next mapping step of the Data Loader, map the parent related field of the child object to the external id field. This will allow the Data Loader to associate each child record with its respective parent record.
After the data is being imported successfully you can delete the field.
Hope that helps.Thanks.
-
Prakhar
MemberJune 13, 2016 at 1:32 pm in reply to: What is the entitlement model, version and activity in Salesforce?Hii Himanshu,
Entitlement Process is an unit of salesforce which helps to provide the customer support by the Agents of the salesforce when a case is being raised by the customers. In simple language it helps the agent reps determine whether a customer is eligible for a support or not.
Entitlement Model is a whole process which includes the process of making the entitlement by the Sales Reps after which an service contract is being created when the customer is being successfully eligible for the support.
There are basically 3 Entitlement Models being given as follows:
Entitlements only (simplest option)
Entitlements + service contracts
Entitlements + service contracts + contract
line items (most complex option)
Whereas entitlement version lets you create a various version of the Entitlement process even when it is being assigned to a case in a salesforce org. -
Prakhar
MemberJune 13, 2016 at 1:28 pm in reply to: What are the Supported WSDL Schema Types for Apex Callouts?Hii Suyash,
For callouts, Apex only supports the document literal wrapped WSDL style, along with primitive and built-in data types. Some of the used tags used in WSDL are as follows:
<types> - Defines the (XML Schema) data types used by the web service
<message> - Defines the data elements for each operation
<portType> -Describes the operations that can be performed and the messages involved.
<binding>- Defines the protocol and data format for each port type.Thanks.
-
Prakhar
MemberJune 13, 2016 at 12:22 pm in reply to: Update Parent Record from a Salesforce triggerHii Nitish,
You can definetly update the parent record when an child record is inserted using triggers. For this you will have to write a trigger on child and when child is inserted you can get the parent record of the child and then update that particular record.
Can you please explain your conditions so that I could come up with the exact solution.
Thanks.
-
Prakhar
MemberJune 13, 2016 at 12:14 pm in reply to: Custom list button to add existing records in a related listHii Naman,
That's right you will have to use an apex class and vf page to display and add the records to the related list of the Assets on selecting the records.
You will have to override the custom list button with the vf page that you will be creating to display the records. In that vf page with the help of wrapper class and add button you will then be able to add the records to the related list.
Hope that helps.
Thanks.
-
Prakhar
MemberJune 13, 2016 at 12:09 pm in reply to: Increase no. of lines displayed in Description field of People tab(Edit Mode)Hii Naman,
Do you want the description field to display more lines for the standard edit page or for the custom vf page?
Thanks.
-
Prakhar
MemberJune 10, 2016 at 2:20 pm in reply to: ReRendered a Page on button click on different PageHii Abhinav,
Thanks for the response.
I am looking to reRendered the pageblock which is on Page 1 when a button is clicked on Page 2.
Thanks.
-
Prakhar
MemberJune 10, 2016 at 2:17 pm in reply to: Apex CPU time limit exceeded while updating through Data loaderHii Nitish,
It seems like you are using nested for loop in your code which is making constant hit to the DB. Since Salesforce has certain limitations such as 100 SOQL queries limit 150 DML statements etc. and similarly it inserts or updates the record 200 at a time for bulk insertion or updation through data loader.
So I would suggest try to optimize your code or share your code.
Thanks.
-
Prakhar
MemberJune 10, 2016 at 2:03 pm in reply to: How to do multiple if else statements in a formula field?Hii Naman,
You can create the formula using nested if-else condition. It would look something like this.
If(ISPICKVAL(Name_Picklist_Field, 'contract type a'),'x',IF(ISPICKVAL(Name_Picklist_Field, 'contract type b'),'y','0')) and so on.
Replace the Name_Picklist_Field with the name of your picklist field api name. This formula works for the text type value.
You can modify it according to your own.
Thanks.
-
Hii Naman,
If you want to auto-populate values from the salesforce to Docusign template then in that case you will have to configure and add the Salseforce authentication in the docusign with the correct username and password for the particular environment.
- After doing that you will have to go on editing the docusign template and create the custom fields/ tag in docusign.
- While creating the custom field/tags there will be a checkbox "Relate to Salesforce".
- Check that checkbox and create the field which will be related to the Salesforce.
- Once the field is being created, you can add the field to the template which is related to the Salesforce.
Hope that solves your issue.
Thanks.
-
Hii Himanshu,
According to your question that I understood is that you want to remove the email address which looks like something like this "[email protected] on behalf of". So to remove this follow the below steps:-
- Click on Setup | Email Administration | Deliverability.
- Locate the Email Security Compliance section.
- Unselect the Enable Sender ID compliance box.
- And then Click Save.
The emails you send will no longer include the "[email protected] on behalf of".
Thanks.
-
Prakhar
MemberJune 9, 2016 at 1:05 pm in reply to: Wizard on button click which will take all values of cost and send it to particular usersHii Utsav,
Yes you are right that sending a lot of values thrugh URL's is not an good idea and that too in an constructor, which will load every time when a page is being loaded, which is of course an bad issue.
What I would suggest is use an action attribute which is of page. In that way your code would be easily readable and also it would make your constructor rather simple.
Hope that helps.
Thanks.
-
Prakhar
MemberMay 26, 2016 at 7:19 am in reply to: Ideas coming to reality in Summer 16 release SalesforceHello Utsav,
The list of ideas that will be released in the summer 16 of Salesforce is being available at the link given below.
https://success.salesforce.com/IdeaSearch?filter=Summer+16Thanks.
- This reply was modified 8 years, 6 months ago by Prakhar.
-
I don't belive we can do that as 'renderAs' is the attribute of the apex:page so you cannot make a different section of a page render as pdf.
In such a case you can make 2 different page out of which one page will be your main page and other page you can render as pdf based on your
requirement.
Example based on the solution suggested is given below:-// Controller for the 2 pages which can be same or different according to your requirement.
public with sharing class pdfPageExampleContrl{
public pdfPageExampleContrl(ApexPages.StandardController controller){
}public pdfPageExampleContrl(){
}// Method which will be called on button click and will redirect to the pdf page.
public PageReference redirect(){PageReference pgRef = new PageReference('/apex/pdfNextPage');
pgRef.setRedirect(true);
return pgRef;
}
}Here You will write Your code which will be converted in to pdf ...
Hope that will resolve your problem.
Thanks. -
Prakhar
MemberApril 30, 2016 at 12:28 pm in reply to: How to create a multi-select lookup relationship between two custom objects?Hello Hazel,
Below is the code that works for the multiselect lookup between the 2 objects. I have used it for Standard objects Account and Contact, you can modify it as per your use for the 2 custom objects.
Below is my code for the vf page:-
<apex:page standardController="Account" extensions="customMutliSelectLookUpCntrl">
<style type="text/css">
.customPopup {
background-color: white;
border-style: solid;
border-width: 2px;
left: 20%;
padding: 10px;
position: absolute;
z-index: 9999;
width: 500px;
top: 20%;
}.disabledTextBox {
background-color: white;
border: 1px solid;
color: black;
cursor: default;
width: 90px;
display: table;
padding: 2px 1px;
text-align:right;
}.closeButton {
float: right;
}
</style>
<apex:form >
<apex:pageBlock id="counter">
<apex:inputtextarea value="{!lookUp}" label="Contact"/>
<apex:commandButton value="Add" reRender="out" action="{!add}"/>
<apex:outputPanel id="out">
<apex:outputPanel styleClass="customPopup" rendered="{!bool}">
<apex:commandButton value="X" title="Close the popup" action="{!closePopup}" styleClass="closeButton" rerender="out"/>
<apex:pageBlockTable value="{!show}" var="e" title="show">
<apex:column >
<apex:inputCheckbox value="{!e.check}"/>
<apex:actionSupport event="onclick" action="{!inIt}"/>
</apex:column>
<apex:column >
<apex:commandLink value="{!e.con.Name}"/>
</apex:column>
</apex:pageBlockTable>
</apex:outputPanel>
</apex:outputPanel>
<apex:commandButton value="Save" action="{!mySave}"/>
</apex:pageBlock>
</apex:form>
</apex:page>
So once you have created the above page just use the below apex class code :-public with sharing class customMutliSelectLookUpCntrl{
public string lookUp{get;set;}
public list<conContact> contactList{get;set;}
public boolean allbool{get;set;}
public string inputValue{get;set;}
public boolean bool{get;set;}
public set<id> contactids{get;set;}
ApexPages.StandardController controller;public customMutliSelectLookUpCntrl(ApexPages.StandardController con){
controller = con;
contactList = new list<conContact>();
bool = false;
contactids = new Set<Id>();
}public class conContact{
public contact con{get;set;}
public boolean check{get;set;}public conContact(contact c, boolean boo){
con = c;
check = boo;
}
}public void inIt(){
list<Contact> selectedContact = new list<Contact>();
lookUp = '';
for(conContact conObj : contactList){
if(conObj.check != false){
system.debug('conObj.con'+conObj.con);
selectedContact.add(conObj.con);
lookUp += conObj.con.name + ' ';
system.debug('lookUp::'+lookUp);
contactids.add(conObj.con.id);
}
}
bool = true;
}
public list<conContact> getShow(){for(Contact coObj:[select id,name from Contact]){
contactList.add(new conContact(coObj,allbool));
}
return contactList;}
public PageReference mySave(){
list<Contact> updateSelectedContact = new list<Contact>();
id accId = ApexPages.CurrentPage().getparameters().get('id');
for(Contact co:[select id,name,accountid from Contact where id =: contactids]){
co.accountid = accId;
updateSelectedContact.add(co);
}
update updateSelectedContact;
return null;
}public void closePopup()
{
bool = false;
}public void add(){
bool = true;}
}Once you have modified the code according to your requirement and the vf page as inline vf page to the layout of the record.
Thanks.
-
Prakhar
MemberApril 29, 2016 at 10:29 am in reply to: How to auto-Populate value of checkbox by click on another Page?Hey Rachit,
Thanks Rachit for your help.
I am using the same controller for both the page, but the problem is whenever an checkbox is clicked i want the value to get populated in the textbox, and if i go according to your solution than the older value will be replaced by the new checkbox value, which i dont want.
What i want is whichever checkbox is checked it is reflected back in the textbox.
Thanks.
-
Prakhar
MemberApril 27, 2016 at 7:44 am in reply to: Can we use Process Builder to schedule a Salesforce Apex Class?Hey Shafali,
Yes you can schedule your class using process builder. For this you have to make your class method as an @InvocableMethod for the static method only and only one argument is being passed in that method which will be of type list<p>.
For help and more knowledge see this link http://www.forcewizard.com/blog/invoking-apex-class-process-builder.
Or you can directly schedule the apex class while selecting object just check the advanced checkbox and add apex through actions and set the schedule according to your need. For more information go through this link- https://help.salesforce.com/apex/HTViewHelpDoc?id=process_limits_scheduled.htm&language=en_US
Thanks.
-
Hey,
For the existing records the trigger does not works. If you want to achieve this using triggers only then you have to either manually update each record or the second choice would be to take a backup of all the records from data loader and then upsert the records back in Salesforce. Then your trigger will work and update the fields.
But the best way is to run a batch class only once using developer console which would be getting all the records from the object on the created date basis and then update the fields in execute method. For example something like this:
global class UpdateFieldForExistingRecord implements Database.Batchable<sObject> {
global Database.QueryLocator start(Database.BatchableContext BC) {
String query = 'select id,name from account where createdDate < today';
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<Contact> scope) {
for(Account a : scope)
{
a.Name = a.Name + 'Updated';
}
update scope;
}
global void finish(Database.BatchableContext BC) {
}
}
Hope that helps.
Thanks.
-
Hey,
You can use formula {!URLENCODE(text)} in your script and replace the text value with the merge field or text string that you want to encode.
Hope that it solves the issue.
Thanks.
-
Prakhar
MemberApril 14, 2016 at 8:03 am in reply to: What are the Available formats for report in Salesforce?The available formats while creating reports are mentioned below. Have a look and choose wisely.
- Tabular
- Matrix
- Summary
- Joined
It totally depend upon the requirement of work to choose report format. Provide the requirement for more information.
-
Prakhar
MemberApril 14, 2016 at 7:52 am in reply to: Can we create multiple records using process builder in Salesforce?Hi,
Yes you can create multiple records using Process Builder.
When a process is created using Process builder, while adding action there is an option in dropdown of using apex, from there you can run your desired Class which can be used for the creation of bulk records.
Hope you find your answer.
Thanks.
-
Hello Utsav,
This can be achieved using Salesforce Approval Lock Result Class which is being introduced in Salesforce Winter 16 as an new class.
To enable this feature, from Setup, enter Process Automation Settings in the Quick Find box, then click Process Automation Settings. Then, select Enable record locking and unlocking in Apex.
For example: You want to lock a account record based on a certain condition which locks the record.
account acc = new account();
acc.name ='Prakhar';
insert acc;
list<account> acclist = new list<account>();
acclist.add(acc);
if(acc.phone == ''){
Approval.LockResult[] lrList = Approval.lock(acclist, false);
}For further information regarding Approval Lock result Class just go through the following links:
https://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_apex_approval_locks_unlocks.htmHope that helps you.
Thanks.- This reply was modified 8 years, 8 months ago by Prakhar.