shariq
IndividualForum Replies Created
-
Hi Madhulika,
WSDL: WSDL stands for Web Services Description Language WSDL is used to describe web services WSDL is written in XML WSDL is a W3C recommendation from 26. June 2007 An WSDL document describes a web service. It specifies the location of the service, and the methods of the service SOAP stands for Simple Object Access Protocol SOAP is an application communication protocol SOAP is a format for sending and receiving messages SOAP is platform independent SOAP is based on XML SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
Hope that helps.
-
shariq
MemberSeptember 3, 2018 at 2:07 pm in reply to: What is a command link and an output link in Salesforce ?Hi Anurag,
apex:commandLink:
A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action. An <apex:commandLink> component must always be a child of an <apex:form> component.
Example - <apex:commandLink action="{!save}" value="Save" id="theCommandLink"/>apex:outputLink:
A link to a URL. This component is rendered in HTML as an anchor tag with an href attribute. Like its HTML equivalent, the body of an <apex:outputLink> is the text or image that displays as the link. To add query string parameters to a link, use nested<apex:param> components.
Example -<apex:outputLink value="https://www.salesforce.com" id="theLink">www.salesforce.com</apex:outputLink>Hope that helps
-
shariq
MemberSeptember 2, 2018 at 9:52 pm in reply to: How can I get started with learning Integrations in Salesforce ? Can you help me with some resource?Hi Rajat,
Best way to start learning integration in salesforce is Trailhead, they have the best explanation with examples. Go through the modules one by one, at the end they have tasks which make learning more fun.
Hope this helps.
-
shariq
MemberSeptember 2, 2018 at 2:31 am in reply to: Can we call an inner class from another class ?Hi Anurag,
Yes you can call inner class from another class. For example :-
Class which contain inner class -
public class ABC {
public class DEF{
public String xyz;
public void ghi(){
System.debug('IN==='+xyz);
}
}
}Class which calls inner class of other class:-
public class QWE {
public void rty(){
ABC.DEF obj = new ABC.DEF();
obj.xyz = 'test';
obj.ghi();
}
}Hope this helps.
-
shariq
MemberSeptember 2, 2018 at 2:21 am in reply to: What are the requirements for making an unmanaged package?Hi Anurag,
There are no such requirements to create unmanaged package, you can create unmanaged package by following steps:-
- Type Packages in quick/find search box.
- Click on the link packages.
- Now click New button on the packages section.
- Fill the required fields and leave the Managed checkbox false. This will create your unmanaged package.
- Add components and Upload it.
Package uploads and installs are available in Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions
Hope this helps.
-
shariq
MemberSeptember 2, 2018 at 2:08 am in reply to: What is the maximum no. of member we can add in any event of campaign?Hi Chanchal,
There is no such fixed limit for adding members to campaign, it depends on your storage limit, you can check your data usage -
1. Type storage usage in quick/find search box.
2.Click on the storage usage link.
Hope this helps.
-
shariq
MemberJanuary 5, 2018 at 11:44 am in reply to: Why can't a Salesforce Junction Object be on the master side of another master-detail relationship?Hi Rahul,
First we need to know why we create junction object---
We create junction object to get many to many relationship functionality, a many to many relationship allows each record of one object to be linked with many records of another object or vice versa.
Salesforce allows only two master detail relationship on any object, as junction object has two masters so when we make master detail field on another object, the name of that junction object will not be shown in the 'Related To' picklist.
Hope this helps.
-
Hi Praveen,
You can find API Name of object by following these steps:-
- Write object in quick find box.
- Click on objects under Create label.
- List of objects will be shown, click on any object will take you to its detail page where you can easily see API Name of that object.
Hope this helps.
-
shariq
MemberSeptember 22, 2017 at 2:11 pm in reply to: Stages available only when another specific stage has been selected in SalesforceHi Radhakrishna,
This can be done by using field dependencies in custom field and relationship of that sobject(Opportunity).
-
shariq
MemberSeptember 19, 2017 at 8:35 am in reply to: A formula field dependent on a picklist value in SalesforceHi Radhakrishna,
This is possible within salesforce platform,
for example:-
I have created some fields which are, 2 picklist(gradeAdded and gradeDeducted), 5 formula fields(score1Add, score2Add, score1Deduct, score2Deduct and gradeTotal) .
picklist value for gradeAdded:-
1.value1
2.value2
picklist value for gradeDeducted:-
1.value1-
2.value2-
formula expressions for given 5 formula fields:-
1.score1Add - IF(TEXT(gradeAdded__c)=='value1' , 20, IF(TEXT(gradeAdded__c)=='value2',10,null))
2.score2Add - IF(TEXT(gradeAdded__c)=='value2' , 20, IF(TEXT(gradeAdded__c)=='value1',10,null))
3.score1Deduct - IF(TEXT(gradeDeducted__c)=='value1-' , 10, IF(TEXT(gradeDeducted__c)=='value2-',5,null))
4.score2Deduct - IF(TEXT(gradeDeducted__c)=='value2-' , 10, IF(TEXT(gradeDeducted__c)=='value1-',5,null))
5.gradeTotal - ( score1Add__c + score2Add__c )-( score1Deduct__c + score2Deduct__c )
If you have any queries please ask.
Hope this helps.
- This reply was modified 7 years, 3 months ago by shariq.
-
shariq
MemberSeptember 15, 2017 at 11:49 am in reply to: Write a trigger on account to store mutiple phone number values in phone number field and splitting those values into three different fields.Hi Raghav,
Can you please describe your question more briefly, what is the criteria for splitting?
-
shariq
MemberSeptember 14, 2017 at 2:07 pm in reply to: How to associate multiple leads to campaign in Salesforce?Hi Shaharyar,
apex controller : -
public class CampaignLeads
{
public List<AddLeads> addFewLeads{get; set;}
public List<CampaignMember> campMems ;
public List<Id> ids;
public Campaign camp;
public CampaignLeads(ApexPages.StandardController sc)
{
ids = new List<Id>();
camp = new Campaign();
addFewLeads = new List<AddLeads>();for(Lead lead: [SELECT Id, LastName FROM Lead WHERE Id NOT IN (SELECT LeadId FROM CampaignMember WHERE CampaignId =: ApexPages.currentPage().getParameters().get('id')) LIMIT 50 ])
{
AddLeads objAddLeads = new AddLeads(lead);
addFewLeads.add(objAddLeads);
}
campMems = new List<CampaignMember>();
}public void insertLead()
{
camp = [SELECT Id FROM Campaign WHERE Id =: ApexPages.currentPage().getParameters().get('id')];
for(AddLeads addLead : addFewLeads)
{
if(addLead.selected == true)
{
CampaignMember campMem = new CampaignMember();
campMem.CampaignId = camp.Id;
campMem.LeadId = addLead.lead1.Id;
campMems.add(campMem);
}
}
insert campMems;
}public class AddLeads
{
public Lead lead1{get; set;}
public Boolean selected{get; set;}
public AddLeads(Lead wrpLead)
{
lead1 = wrpLead;
selected = false;
}
}
}Visualforce Page :-
<apex:page standardController="Campaign" extensions="CampaignLeads" >
<apex:form id="formID">
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Insert Lead" reRender="formID" action="{!insertLead}" oncomplete="CampaignPage()" />
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!addFewLeads}" var="le" columns="4">
<apex:column headerValue="Select">
<apex:inputCheckbox value="{!le.selected}"/>
</apex:column>
<apex:column value="{!le.lead1.LastName}">
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<script>
function CampaignPage()
{
window.top.location='/{!Campaign.Id}';
}
</script>
</apex:page>Put this VF page on Campaign detail page layout.
Hope this helps.
-
Hi Rajesh,
You may refer to this link - https://www.forcetalks.com/blog/salesforce-to-salesforce-integration-using-rest-api/
Hope this helps.
-
shariq
MemberAugust 22, 2017 at 10:56 am in reply to: What is Salesforce visualforce components and what is the use in Visualforce pages? -
shariq
MemberAugust 22, 2017 at 9:27 am in reply to: How i can delete selected list value on button click in Salesforce?Hi Shaharyar,
I have written code for deleting selected contacts.
Apex Controller:-
public class WrapperDeleteContactsAccounts
{
List<WrapContacts> conListWrap ;
List<Account> accounts ;
List<Contact> contacts ;
List<Contact> delContacts;
public WrapperDeleteContactsAccounts()
{
conListWrap = new List<WrapContacts>();
accounts = new List<Account>();
contacts = new List<Contact>();
delContacts = new List<Contact>();
}
public class WrapContacts
{
public Contact con {get;set;}
public Boolean check {get;set;}
public WrapContacts(Contact c)
{
con = c;
check = false;
}
}
public List<WrapContacts> getContacts()
{
contacts = [SELECT Id, LastName, AccountId, Gender__c FROM Contact LIMIT 100];
for(Contact c : contacts)
{
conListWrap.add(new WrapContacts(c));
}
return conListWrap;
}
public PageReference deleteContacts()
{
PageReference PageRefer = new PageReference('/apex/WrapperDelPage');
PageRefer.setRedirect(true);
delContacts = new List<Contact>();
for(WrapContacts c : conListWrap)
{
if(c.check == true)
{
delContacts.add(c.con);
}
}
try
{
delete delContacts;
}
catch(Exception e)
{
System.debug('m====='+e.getMessage());
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,e.getMessage()));
return null;
}
return PageRefer;
}
}Apex Page:-
<apex:page controller="WrapperDeleteContactsAccounts" sidebar="false">
<apex:form >
<apex:pageBlock id="pb">
<apex:pageBlockButtons >
<apex:commandButton value="delete selected" action="{!deleteContacts}" reRender="pb" />
</apex:pageBlockButtons>
<apex:pageMessages />
<apex:pageBlockTable value="{!Contacts}" var="cont" columns="5" Id="pb1">
<apex:column headerValue="select">
<apex:inputCheckbox value="{!cont.check}"/>
</apex:column>
<apex:column value="{!cont.con.LastName}"/>
<apex:column value="{!cont.con.Gender__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>Hope this helps.
-
shariq
MemberAugust 21, 2017 at 2:03 pm in reply to: Can we get value of a particular field of object on a link in Salesforce?Hi Shubham,
Apex Controller:-
public class AccountNameLink
{
public List<Account> accList {get;set;}
public List<Account> accList2 {get;set;}
public String linkId{get;set;}
public AccountNameLink()
{
accList = [SELECT Name FROM Account LIMIT 100];
linkId = '';
accList2 = new List<Account>();
}
public void showAccounts()
{
accList2 = [SELECT Name, Description FROM Account WHERE Id =:linkId];
}
}Apex Page:-
<apex:page controller="AccountNameLink">
<apex:form>
<apex:pageBlock>
<apex:repeat value = "{!accList}" var ="acc" >
<apex:commandLink value="{!acc.Name}" action ="{!showAccounts}" reRender="pb">
<apex:param value="{!acc.Id}" Name="Account Id" assignTo="{!linkId}"/>
</apex:commandLink>
<br/>
<apex:pageBlockTable value = "{!accList2}" var="acc2" columns="3" Id="pb">
<apex:column value = "{!acc2.Description}"/>
<apex:column value = "{!acc2.Name}"/>
</apex:pageBlockTable>
</apex:repeat>
</apex:pageBlock>
</apex:form>
</apex:page>Hope this Helps.
-
shariq
MemberAugust 21, 2017 at 1:34 pm in reply to: How we can make a button of expand and collapse in Salesforce?Hi Shubham,
Apex Page:-
<apex:page controller ="AccountPlusContact">
<apex:form>
<apex:pageBlock>
<h1>
Account
</h1>
<apex:commandLink value = "{!plus}" action ="{!accountShow}"/>
<apex:pageBlockTable value="{!accList}" var="acc" columns="3">
<apex:column value="{!acc.Name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page> -
shariq
MemberAugust 21, 2017 at 1:00 pm in reply to: How we can make a button of expand and collapse in Salesforce?Hi Shubham,
public class AccountPlusContact
{
public String plus{get;set;}
public List<Account> accList{get;set;}
public List<Contact> conList{get;set;}
public Integer i;
public AccountPlusContact()
{
i = 0;
plus = '[+]';
accList = new List<Account>();
conList = new List<Contact>();
}
public void accountShow()
{
if(i == 0)
{
accList = [SELECT Name FROM Account LIMIT 100];
plus = '[-]';
i = 1;
}
else
{
plus = '[+]';
accList = null;
i = 0;
}
}
}You can similarly write for contacts.
Hope this helps.
-
shariq
MemberAugust 17, 2017 at 11:03 am in reply to: How to show my account list on apex page at the time when we preview the page in Salesforce?Hi Neha,
In your apex controller you have taken list in a constructor, I am taking list in a method, then how to show my list when the page loads.
-
shariq
MemberAugust 17, 2017 at 9:56 am in reply to: how we edit the description of account selected account from a Salesforce list?Hi Shubham,
Apex Code:-
public class EditDescription
{
List<Account> accList{get;set;}
public EditDescription()
{
accList = [SELECT Name, Description FROM Account LIMIT 10];
}
public void editAccount()
{
update accList;
}
}
Apex Page:-
<apex:page controller="EditDescription" sidebar="false" >
<apex:form>
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton action="{!editAccount}" value="Add New Account" rerender="pageId"/></apex:pageBlockButtons>
<apex:pageBlockTable var="customAccount" value="{!accList}" id="pageId">
<apex:column ><h1>
Account Name
</h1> <apex:inputfield value="{!customAccount.Description}" /></apex:column></apex:pageBlockTable>
</apex:form>
</apex:page>
-
shariq
MemberAugust 17, 2017 at 7:50 am in reply to: What are the standard validations in Salesforce?Hi Pranav,
System validations are the validation which are enforced by Salesforce like number field should not contains alphabets, phone number should be in valid format etc..
While custom validation rule are the one which are created manually under object.
There is a difference in order of execution for standard and custom validation. Standard validations are run before the before trigger event after that custom validation are executed.
Hope this helps.
-
shariq
MemberAugust 17, 2017 at 7:26 am in reply to: How to take List of Account into a JavaScript variable on a Salesforce Visualforce page?Hi Radhakrishna,
Can you do this for Account List, Please give the example.
-
shariq
MemberAugust 17, 2017 at 7:17 am in reply to: How we can insert values of set in a Salesforce list?Hi Shubham,
You can use addAll method of list, for example :-
List.addAll(SetElements)
Hope this Helps.
-
shariq
MemberAugust 16, 2017 at 3:03 pm in reply to: How to create unique contacts in Salesforce depending on the value of number of location field in account object?Hi Shaharyar,
You can't use Set of Contacts because contact's records may have same value for LastName field.
For Example :-
Set <Contact> setCon = new Set<Contact>();
Contact con = new Contact(LastName = 'test');
Contact con1 = new Contact(LastName = 'test');
insert con; insert con1;
setCon.add(con); setCon.add(con1);
'setCon' Set will only contain contact 'con' as LastName field is same for both sobjects.
And for DML Operation You can use only sobjects or list of sobjects.
Hope this helps.
-
shariq
MemberAugust 16, 2017 at 2:37 pm in reply to: What is difference between Visual Workflow and Workflow Rule in Salesforce?Hi Shubham,
You may refer to this link.