Forum Replies Created

Page 3 of 4
  • Hello Saagar,

    Please follow below steps to do so.

    Login to Org
    Go to Setup
    Write “Quote Setting” in quick find box
    click on “Quote Settings”
    Check “Enable Quotes”
    Click Save

    Rest you can also explore more by Read Here.

    Thanks!

  • Archit

    Member
    March 27, 2018 at 12:25 pm in reply to: What is JSON and why we use it in Salesforce?

    Hello Rahul,

    JSON i.e. JavaScript Object Notation used in exchanging data between a browser and a server, the data can only be text. JSON is text, and we can convert any JavaScript object into JSON, and send JSON to the server. We can also convert any JSON received from the server into JavaScript objects. JSON is light weighted than XML so that we can prefer to choose JSON mostly in place of XML.

    Thanks!

  • Archit

    Member
    March 27, 2018 at 12:25 pm in reply to: What is a Self-Relationship in Salesforce?

    Hello Rahul,

    A Self-Relationship is a lookup relationship to the same object.

    For example :  we have a field on Account which is Parent Account that allows us to choose any account for being a parent account of an existing one.

    Thanks!

  • Archit

    Member
    March 27, 2018 at 8:11 am in reply to: What is service process in Salesforce?

    Hello,

    Service process in Salesforce is taking care by one of the product introduced by Salesforce i.e. Service Cloud. The whole process under this cloud works basically to enhance the level of services given by an organisation to their customers. To explore more about Service Cloud you can Click Here to read my blog on same.

    Thanks!!

  • Hello Ankit,

    A wrapper class is a custom object defined by programmer wherein he defines the wrapper class properties. Consider a custom object in Salesforce, what do you have in it? fields right? different fields of different data types. Similarly wrapper class is a custom class which has different data types or properties as per requirement. We can wrap different objects types or any other types in a wrapper class.

    Thanks!

  • Hello Rahul,

    All Account Team Members are added into AccountTeamMember & all Opportunity Team Members are added into OpportunityTeamMember.

    Thanks,

  • Archit

    Member
    March 26, 2018 at 9:24 am in reply to: How does SOAP and REST Communicate in Salesforce?

    Hello Rahul,

    SOAP & REST both are use for integration purpose, SOAP will communicate through WSDL file while the REST will communicate through HTTP file.

    Thanks!

  • Hello Kapil,

    I was searching out an answer of your question and I found something related that may be it would be helpful to get your answer. Below is the piece of code which you need to run in anonymous window It creates 2 Account records and 2 Child opportunity records referring to same parent account. And you will get Ids of all inserted records in debug.

     

    Date dt = Date.today();
    dt = dt.addDays(7);
    
    List lstSobject = new List();
    
    Opportunity newOpportunity1 = new Opportunity(Name='OpportunityWithAccountInsert1',StageName='Prospecting',CloseDate=dt);        
    Account accountReference = new Account(MyExtID__c='12345'); 
    newOpportunity1.Account = accountReference;
    lstSobject.add(newOpportunity1);
    
    Opportunity newOpportunity2 = new Opportunity(Name='OpportunityWithAccountInsert2',StageName='Prospecting',CloseDate=dt);        
    Account accountReference = new Account(MyExtID__c='12345'); 
    newOpportunity2.Account = accountReference;
    lstSobject.add(newOpportunity2);
    
    Account parentAccount1 = new Account(Name='Hallie',MyExtID__c='SAP1111112'); 
    lstSobject.add(parentAccount1);
    Account parentAccount2 = new Account(Name='Hallie',MyExtID__c='SAP111111'); 
    lstSobject.add(parentAccount2);
    
    Database.SaveResult[] results = Database.insert(lstSobject);
    
    for (Integer i = 0; i < results.size(); i++) {
                if (results[i].isSuccess()) {
                System.debug('Successfully created ID: '
                      + results[i].getId());
                } else {
                System.debug('Error: could not create sobject '
                      + 'for array element ' + i + '.');
                System.debug('   The error reported was: '
                      + results[i].getErrors()[0].getMessage() + '\n');
                }
            }
    
  • Hello Kapil,

    We can create many – to – Many relationship by using junction object. Junction object is a custom object with two master detail relationships.

    Thanks!

  • Archit

    Member
    March 23, 2018 at 12:25 pm in reply to: How can I create custom picklist on a Salesforce Visualforce Page?

    Visualforce Page

    <apex:page controller="DisplayData">
    <apex:form >
    <apex:pageBlock title="Search Here">
    <b>Object : </b>
    <apex:selectList size="1" value="{!selectObject}">
    <apex:selectOption itemValue="None" itemLabel="-None-"/>
    <apex:selectOption itemValue="Account" itemLabel="Account"/>
    <apex:selectOption itemValue="Contact" itemLabel="Contact"/>
    </apex:selectList>
    <apex:commandButton value="Display" action="{!SearchObject}"/>
    </apex:pageBlock>
    <apex:pageBlock title="Search Result">
    <apex:pageBlockTable value="{!resultList}" var="res">
    <apex:column value="{!res['Name']}"/>
    </apex:pageBlockTable>
    </apex:pageBlock>
    </apex:form>
    </apex:page>

    Apex Class

    public class DisplayData {

    Public list<Sobject> resultList{get;set;}
    public string selectObject{get;set;}

    public DisplayData()
    {
    resultList = new list<Sobject>();
    }

    public void SearchObject()
    {
    if(selectObject != 'None')
    resultList = Database.query('SELECT Name FROM '+selectObject+' LIMIT 20');

    }
    }

  • Archit

    Member
    March 23, 2018 at 12:17 pm in reply to: What is the purpose of Using "seeAllData=true" in Salesforce Apex?

    Hello Suraj,

    By using  @isTest(SeeAllData=true) annotation on any class enables all the test methods in this class to access all data in an organisation.

    Thanks,

  • Archit

    Member
    March 23, 2018 at 12:04 pm in reply to: What is the default value of SeeAllData in Salesforce?

    Hello Ankit,

    Annotate your test class or test method with IsTest(SeeAllData=true) to open up data access to records in your organisation. By default SeeAllData is false but you can make it true by using above.

    Thanks!

  • Archit

    Member
    March 23, 2018 at 11:37 am in reply to: How to write the Salesforce Trigger for a Custom Object's Attachment?

    Actually, I am not able to find out whether I can write trigger on attachment or not. Please help me out.

    • This reply was modified 6 years, 8 months ago by  Archit.
  • Archit

    Member
    March 23, 2018 at 11:32 am in reply to: Can we create a custom field through Salesforce Apex?

    Hello Ankit,

    Please try the below code it may help you to achieve your task

    MetadataService.CustomObject customObject = new MetadataService.CustomObject();
    customObject.fullName = 'Test__c';
    customObject.label = 'Test';
    customObject.pluralLabel = 'Tests';
    customObject.nameField = new MetadataService.CustomField();
    customObject.nameField.type_x = 'Text';
    customObject.nameField.label = 'Test Record';
    customObject.deploymentStatus = 'Deployed';
    customObject.sharingModel = 'ReadWrite';
    MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { customObject });

  • Hello Ankit,

    The best possible way to choose below options to Inactive trigger in production.

    a) via Force.com IDE,
    Disable the trigger in sandbox environment [You should have a sandbox org which contains the same trigger]
    Create a new project in Eclipse using the Sandbox and including the trigger (or refresh your existing Eclipse project)
    1. Alternative: edit the triggername.trigger-meta.xml in an existing project and change the status node to false: <status>Inactive</status>
    2. Save the change locally Deploy the trigger to production
    Complete the data load
    If the change is not permanent or you want to enable the trigger again then enable the trigger by making it active on the sandbox or project again and deploy it to production

    b) via Changesets,
    Disable the trigger in a Sandbox environment [You should have a Sandbox org which contains the same trigger]
    Create a new Outbound Change Set in the Sandbox
    Add the disabled trigger to the Change Set
    Upload the Change Set to your Production Org
    In Production, go to Inbound Change Sets and wait for the uploaded Change Set to be available
    Click Deploy to run the tests and apply the changes

    Hope It would be helpful !!

  • You can also achive this by writting trigger on User sObject to shoot an email as per the example provided below. It can be achieve using workflow rule also but I am not sure for that.

    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

    //Set email address

    String[] toAddresses = new String[] {emailAddr};

    mail.setToAddresses(toAddresses);

    mail.setSubject('Subject - User Creation');

    mail.setPlainTextBody('User has been cretaed!');

    Hope this helps.

  • Hello Ankit,

    Please follow below steps:

    • click on setup
    • Type objects in quick find box
    • Choose "Objects"
    • click on any custom object available at there.
    • You can find "API Name" at there.

    Hope It would be helpful !!

  • Archit

    Member
    March 23, 2018 at 11:14 am in reply to: How to know the API Name of Standard or Custom Salesforce Objects?

    Hello Mark,

    For Standard objects : Salesforce provide a master list that carries all information about standard objects https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm

    For Custom Object : Api names are available on custom object detail page

    Follow below steps:

    • click on setup
    • Type objects in quick find box
    • Choose "Objects"
    • click on any custom object available at there.
    • You can find "API Name" at there.

    Hope It would be helpful !!

     

  • Hello Neha,
    It seems great that you have find an answer of your own question. But I think the below code also might be helpful to achieve same.

    VF Page:

    <apex:page controller="testtwilio">
    <apex:form >
    <apex:commandButton action="{!hello}" value="Make a Call"/>
    </apex:form>
    </apex:page>

    Apex Class :

    public class testtwilio {

    String account = 'ACe8e44b316e6a15009f6ccb688cf56d19';
    String token = '279daad95178678bcb199d328ff5ca31';

    public PageReference hello(){
    TwilioRestClient client = new TwilioRestClient(account, token);

    Map<String,String> properties = new Map<String,String> {
    'To' => '+918147430168',
    'From' => '+2015826854',
    'Body' => 'Hello!'
    };
    TwilioMessage message = client.getAccount().getMessages().create(properties);
    return null;
    }
    }

    Hope It would be helpful !!

  • Archit

    Member
    March 16, 2018 at 10:21 am in reply to: What is the use of apex:facet in Salesforce Visualforce?

    Hello Kapil,

    <apex:facet> a Visualforce Component that are use to display the specific part of parent component such as header and footer of <apex:dataTable>.

    Thanks!

  • Hello Kapil,

    <apex:SelectOptions> reflects a plural term, which says that we can configure multiple options in the list of choice options by calling directly a list of value by using single line of code.

    Example :

    <apex:selectOptions value={!ListofValues}/>

    ListofValues is the list that contains content.

    <apex:selectList > allows you to provide choice options as per your choice or putting upon separate values in picklist.

    Example :

    <apex:selectList >
    <apex:selectOption value={!value1}/> <!--if you are putting it as a separate values -->
    <apex:selectOption value={!value2}/>
    <apex:selectOption value={!value3}/>
    </apex:selectList>

    Hope This Would be Helpful!!

  • Archit

    Member
    March 15, 2018 at 10:00 am in reply to: What is the difference between a Role and Profile in Salesforce?

    Hello Kapil,

    • Profiles and Roles both have there own piece of importance where profile basically determined for Object Access while roles for record level access under sharing and security model.
    • Profiles are required for every users while Roles are not required. While creating new user the Role field shows required on layout but by default it takes <None Specified> as value.

    In reference to get deep dive to explore about both Click Here

    Hope It would be helpful

    Thanks!!

  • Hello Kapil,

    External id is a unique record identifiers from a system outside of Salesforce. While importing data by data import wizard it can figure out duplicate records by the help of their external Id's.

    Exploring the same :

    If any application that have data of employees (like empId, name,designation etc.) is now linking with Salesforce so when they both linked together and application's data imported to Salesforce so at that time the empId of employees in existing application is considered as an external Id for Salesforce.

    Hope This Would Be Helpful

    Thanks!!

  • Hello Kapil,

    Generally system administrators can have full access on your org without assisting any action from you, but in case if you want to grant access to System Admin or other specific users only for aparticular piece of interval then you have a feature name Grant Login Access in your org.
    How to enable Grant Login Access :

    • login to org
    • click on setup
    • search keyword "grant"
    • choose "Grant Login Access" under "My Personal Information"
    • Make settings as per requirement
    • Click Save

    Hope This would be helpful
    Thanks

  • Hello Subodh,

    Please try with below code might be it would be helpful.

    public class TestPersonAccount {
    public static Boolean personAccountsEnabled()
    {
    try
    {
    sObject testObject = new Account();
    testObject.get( 'isPersonAccount' );
    System.debug('Account Enabled');
    return true;
    }
    catch( Exception ex )
    {
    System.debug('Account Disable');
    return false;
    }
    }

    }

Page 3 of 4