高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/CM_SearchContact.cls
@@ -16,6 +16,8 @@
    public String contactsInfo {set;get;}
    public String awsDataIdArray {set;get;}
    public String sfContactId{set;get;} //zhj 2022-12-02 sfId
    public CM_SearchContact() {
        openLine = Apexpages.currentPage().getParameters().get('line');
        accountId = Apexpages.currentPage().getParameters().get('acc');
@@ -69,6 +71,7 @@
        newCon = new Contact();
        newCon.AccountId = accountId;
        sfContactId = ''; //zhj 2022-12-02 sfId
        return;
    }
@@ -132,11 +135,16 @@
    public PageReference editContact() {
        if (conId != null && conId != '') {
            newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c,
            // newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,LastName_Encrypted__c,Phone_Encrypted__c,
            //           FirstName, LastName,AWS_Data_Id__c
            //           from Contact where Id = :conId];
            newCon = [select Id, Name, Department__c, Type__c, Search_LastName__c, Search_FirstName__c, Phone, Supplement__c,
                      FirstName, LastName,AWS_Data_Id__c
                      from Contact where Id = :conId];
                      from Contact where Id = :conId];  //zhj 新方案改造 去除Encrypted__c 2022-12-05
            newCon.Search_LastName__c = newCon.LastName;
            newCon.Search_FirstName__c = newCon.FirstName;
            sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws
        }
        return null;
@@ -151,6 +159,8 @@
        newCon.FirstName = newCon.Search_FirstName__c;
        upsert newCon;
        sfContactId = newCon.Id; // zhj 2022-12-02 得到sfid给aws
        searchCon.Search_LastName__c = newCon.LastName;
        searchCon.Search_FirstName__c = newCon.FirstName;
        searchContact();