This product is fully accessible for development: SalesForce

This product is fully accessible: SalesForce

Article directory

  • This product is fully accessible for development: SalesForce
    • 1. Product introduction
    • 2. Development Introduction
    • 3. Development mode
    • 4. Code testing

Background: I have used a lot of product-based secondary development components and systems, and there are more or less pitfalls. I have also used a lot of low-code platform development, and it is very convenient to use. Here I summarize a system: Salesforce, the world’s number one CRM The customer relationship management system is a saas cloud product that is easy to use

1. Product introduction

In 1999, the four founders of Salesforce worked side by side in a small San Francisco apartment to launch a customer relationship management (CRM) system that sparked a groundbreaking shift. All software and key customer data will be hosted on the Internet and made available as a subscription service. This pioneering “software as a service” (or SaaS) model quickly took the technology industry by storm.
Salesforce includes the following modules:
image.png
From marketing to customer acquisition, to business process review and finally to after-sales service, salesforce has a comprehensive customer relationship management system life cycle.
From an industry perspective, salesforce adjusts products for different industries to adapt to faster applications:
image.png
Salesforce has acquired Tableau and Mulesoft successively. It is more convenient and faster to use visualization on Salesforce. It is basically a seamless connection. The report configuration is very fast, and operators can also configure their own reports.

2. Development Introduction

The development language used by salesforce is APEX, which is very similar to Java, and those who are familiar with Java can quickly start developing. APEX Manual: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ref_guide.htm
W3C tutorial: https://www.w3cschool.cn/apex/
image.png
You can write both code logic and SQL in APEX, which is very convenient to use. For the community, Salesforce has its own community and tutorials. The link is as follows: image.png

3. Development mode

The developed code is deployed to the cloud. The development tool uses sublimtext, and the haoide plug-in can be used to obtain and update the code. Custom development does not need to rebuild the code management platform. The development mode uses various Trigger triggers. Trigger the logic code we need before and after each Trigger.
image.png
image.png

public class MyAccountController{<!-- -->
    public Account account {<!-- --> get; private set; }
    public MyAccountController() {<!-- -->
        Id id = ApexPages.currentPage().getParameters().get('id');
        account = (id == null) ? new Account() :
            [SELECT Name,Phone,Industry FROM Account WHERE Id = :id];
    }
     public PageReference save() {<!-- -->
        try {<!-- -->
            upsert(account);
        } catch(System.DMLException e) {<!-- -->
            ApexPages. addMessages(e);
            return null;
        }
        // After successful Save, navigate to the default view page
        PageReference redirectSuccess = new ApexPages. StandardController(Account). view();
        return (redirectSuccess);
    }
    public List<Account> getmyAccounts(){<!-- -->
       List<Account> accList = new List<Account>([select Id,AccountNumber,Name from account where OwnerId =:userinfo.getUserId()]);
       return accList;
    }
}

During the development process, we will create a lot of objects. Objects can be created with low-code on Salesforce. After creation, the data table is also created, and then you can directly use the low-code platform to configure fields and logic on the interface. Permissions required Configuration is done in the background via roles and profiles. image.png
Also in terms of data viewing, Salesforce comes with its own database query tool, and there is no need to install other software. You only need to install the Google browser plug-in to use it. Compared with opening a lot of various software when we were developing, Salesforce only needs a vscode or just sublimtext
image.png
Permissions Management Module: Every Salesforce user in the organization has a profile. Profiles are designed to divide users into role functions, such as sales, support, etc. The most important profile in an organization is the system administrator, with absolute authority to perform any action. In addition to CRED, administrators can also select View All and Modify All for each object.
And Salesforce has profiles and roles to control permissions, and the configuration can control permissions
Profiles: used for user operation object level and field level permission control. Each user has a profile, there are two types of profiles, standard and custom
Roles: Access control at the user record level, through role-hierarchy and sharing-rules.

image.png

4. Code test

When the written code is deployed to the system, a test class must be written, and the code coverage rate must reach more than 75% before deployment is allowed, otherwise the deployment will fail. It is worth mentioning that in Salesforce, not only custom code can be deployed with one click, but also Even configuration items and permission configurations can be deployed, which is very convenient.