• Erin Ryan 52
  • NEWBIE
  • 10 Points
  • Member since 2022


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 9
    Replies
Our new profile cannot view the VF component ContactLinkedInMemberPage(scrollbar) even though all VF, apex security access has been granted. I've contacted LinkedIn but was curious if anyone else is experiencing this issue. Thanks

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of undefined (reading 'setParams')] Callback failed: apex://LID.SalesNavigatorProfileController/ACTION$getIframeData Failing descriptor: {markup://lightning:notificationsLibrary}
 
I'm trying to bulk hard delete Account detail childs records but I'm receiving the "UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []" error message. I'm curious if the apex code logic is causing this issue.  Thank you for your time. 

public with sharing class TruceCreateEntityRequest {
    @AuraEnabled
    public static Account getAccount(Id accountId) {
        return [SELECT Name, BillingCountryCode, BillingState, BillingCity, Entity_ID__c, Won_Opportunity_Count__c FROM Account WHERE Id = :accountId];
    }
    @AuraEnabled
    public static String truceCreateEntityRequest(map<string, string> body) {
        // timestamp creation
        String salt = '4947cafc63236413eeaef625cb840679';
        Long longtime = datetime.now().getTime()/1000;
        String timestamp = String.valueOf(longtime);
        // token creation
        Blob blobstamp = Blob.valueOf(timestamp);
        String EncodedTime = EncodingUtil.base64Encode(blobstamp);
        String timerequest = salt + EncodedTime;
        Blob blobRequest = Blob.valueOf(timerequest);
        Blob md5 = Crypto.generateDigest('MD5', blobRequest);
        String token = EncodingUtil.convertToHex(md5);

        String devUrl = 'https://integrations-dev.trucesoftware.com/salesforce/organization.php';
        String prodUrl = 'https://integrations.trucesoftware.com/salesforce/organization.php';

        String sandboxQuery = 'SELECT Id, IsSandbox, Name FROM Organization LIMIT 1';
        List<sObject> databaseResults = Database.query(sandboxQuery);

        String url = prodUrl;
        if ((Boolean)databaseResults[0].get('IsSandbox')) {
            url = devUrl;
        }

        body.put('token', token);
        body.put('timestamp', timestamp);
        String request_body = JSON.serialize(body);
        String companyVal = String.valueOf(body.get('company'));
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint(url);
        request.setMethod('POST');
        request.setHeader('Content-Type', 'application/json;charset=utf-8');
        request.setBody(request_body);
        HttpResponse response = new Http().send(request);
        String StrResponse = string.valueOf(response);

        if (response.getStatusCode() != 201) {
            System.debug('The status code returned was not expected: ' +
                         response.getStatusCode() + ' ' + response.getStatus());
        } else {
            System.debug(response.getBody());

            // Grab entity ID from response body
            String res = response.getBody();
            String[] org = res.split(':');
            String orgID = org[2];
            orgID = orgID.substring(0,orgID.length()-1);
            // Update company by assigning it its entityID from Database
            try {
                List<Account> accountUpdate = [SELECT Entity_ID__c FROM Account WHERE Name = :companyVal LIMIT 1];
                Account entity = accountUpdate[0];
                entity.Entity_ID__c = orgID;
                update entity;
            } catch(Exception e) {
                System.debug('An unexpected error has occurred: ' + e.getMessage());
            }
        }
        return response.getBody();
    }
}
We've implemented a data integrity project starting with removing special characters from Contact last name. Unfortunatley 'something' is reverting and reinserting the removed special characters , in addition to updating Mailing Street with the below contact history? Has anyone seen this the below Mailing Street update? Not sure if the data updates are generated from Pardot, Inbox. The date/time stamp indicates it may be the LogObjectEmailFieldTriggerHandler. I hope this makes sense, I"m at a loss for the root cause. Thanks so much. 


Changed Mailing Street from Texas&amp;amp;amp;amp;lt;br&amp;amp;amp;amp;gt;United States&amp;amp;amp;lt;br&amp;amp;amp;gt;TX&amp;amp;amp;lt;br&amp;amp;amp;gt to Texas<br>United States TX US.
I created a formula field link to the Fedex/UPS tracking page , but it stopped working and I"m not sure why. Any support is appreciated. Thanks!

IF(
 LEN( Tracking_Number__c  ) = 18,
    HYPERLINK("http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum="&Tracking_Number__c , 'UPS Tracking Info'),
  IF(
     LEN( Tracking_Number__c ) = 12,
        HYPERLINK("https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber="&Tracking_Number__c  & "cntry_code=us", 'FedEx Tracking Info'),
     IF(
        ISBLANK(Tracking_Number__c  ), "",
       'No Tracking Number'
    )
  )
)
When creating/refreshing a sandbox,  is possible to include an apex class that will nulify the SSO configuration and enable My Domain 'login form' ? Due to our org wide SSO setup , I'm unable to access new/refreshed sandboxes unless I disable SSO/My Domain prior to sandbox creation. I'd prefer to automate this process if possible. Thanks 
I need to prohibit users from deleting Opportunity attachments via Notes & Attachments except system admin. I'm not a developer so any help is appreciated! Thanks so much.  
Our new profile cannot view the VF component ContactLinkedInMemberPage(scrollbar) even though all VF, apex security access has been granted. I've contacted LinkedIn but was curious if anyone else is experiencing this issue. Thanks

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of undefined (reading 'setParams')] Callback failed: apex://LID.SalesNavigatorProfileController/ACTION$getIframeData Failing descriptor: {markup://lightning:notificationsLibrary}
 
I'm trying to bulk hard delete Account detail childs records but I'm receiving the "UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []" error message. I'm curious if the apex code logic is causing this issue.  Thank you for your time. 

public with sharing class TruceCreateEntityRequest {
    @AuraEnabled
    public static Account getAccount(Id accountId) {
        return [SELECT Name, BillingCountryCode, BillingState, BillingCity, Entity_ID__c, Won_Opportunity_Count__c FROM Account WHERE Id = :accountId];
    }
    @AuraEnabled
    public static String truceCreateEntityRequest(map<string, string> body) {
        // timestamp creation
        String salt = '4947cafc63236413eeaef625cb840679';
        Long longtime = datetime.now().getTime()/1000;
        String timestamp = String.valueOf(longtime);
        // token creation
        Blob blobstamp = Blob.valueOf(timestamp);
        String EncodedTime = EncodingUtil.base64Encode(blobstamp);
        String timerequest = salt + EncodedTime;
        Blob blobRequest = Blob.valueOf(timerequest);
        Blob md5 = Crypto.generateDigest('MD5', blobRequest);
        String token = EncodingUtil.convertToHex(md5);

        String devUrl = 'https://integrations-dev.trucesoftware.com/salesforce/organization.php';
        String prodUrl = 'https://integrations.trucesoftware.com/salesforce/organization.php';

        String sandboxQuery = 'SELECT Id, IsSandbox, Name FROM Organization LIMIT 1';
        List<sObject> databaseResults = Database.query(sandboxQuery);

        String url = prodUrl;
        if ((Boolean)databaseResults[0].get('IsSandbox')) {
            url = devUrl;
        }

        body.put('token', token);
        body.put('timestamp', timestamp);
        String request_body = JSON.serialize(body);
        String companyVal = String.valueOf(body.get('company'));
        Http http = new Http();
        HttpRequest request = new HttpRequest();
        request.setEndpoint(url);
        request.setMethod('POST');
        request.setHeader('Content-Type', 'application/json;charset=utf-8');
        request.setBody(request_body);
        HttpResponse response = new Http().send(request);
        String StrResponse = string.valueOf(response);

        if (response.getStatusCode() != 201) {
            System.debug('The status code returned was not expected: ' +
                         response.getStatusCode() + ' ' + response.getStatus());
        } else {
            System.debug(response.getBody());

            // Grab entity ID from response body
            String res = response.getBody();
            String[] org = res.split(':');
            String orgID = org[2];
            orgID = orgID.substring(0,orgID.length()-1);
            // Update company by assigning it its entityID from Database
            try {
                List<Account> accountUpdate = [SELECT Entity_ID__c FROM Account WHERE Name = :companyVal LIMIT 1];
                Account entity = accountUpdate[0];
                entity.Entity_ID__c = orgID;
                update entity;
            } catch(Exception e) {
                System.debug('An unexpected error has occurred: ' + e.getMessage());
            }
        }
        return response.getBody();
    }
}
We've implemented a data integrity project starting with removing special characters from Contact last name. Unfortunatley 'something' is reverting and reinserting the removed special characters , in addition to updating Mailing Street with the below contact history? Has anyone seen this the below Mailing Street update? Not sure if the data updates are generated from Pardot, Inbox. The date/time stamp indicates it may be the LogObjectEmailFieldTriggerHandler. I hope this makes sense, I"m at a loss for the root cause. Thanks so much. 


Changed Mailing Street from Texas&amp;amp;amp;amp;lt;br&amp;amp;amp;amp;gt;United States&amp;amp;amp;lt;br&amp;amp;amp;gt;TX&amp;amp;amp;lt;br&amp;amp;amp;gt to Texas<br>United States TX US.
I created a formula field link to the Fedex/UPS tracking page , but it stopped working and I"m not sure why. Any support is appreciated. Thanks!

IF(
 LEN( Tracking_Number__c  ) = 18,
    HYPERLINK("http://wwwapps.ups.com/WebTracking/processRequest?HTMLVersion=5.0&Requester=NES&AgreeToTermsAndConditions=yes&loc=en_US&tracknum="&Tracking_Number__c , 'UPS Tracking Info'),
  IF(
     LEN( Tracking_Number__c ) = 12,
        HYPERLINK("https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber="&Tracking_Number__c  & "cntry_code=us", 'FedEx Tracking Info'),
     IF(
        ISBLANK(Tracking_Number__c  ), "",
       'No Tracking Number'
    )
  )
)
When creating/refreshing a sandbox,  is possible to include an apex class that will nulify the SSO configuration and enable My Domain 'login form' ? Due to our org wide SSO setup , I'm unable to access new/refreshed sandboxes unless I disable SSO/My Domain prior to sandbox creation. I'd prefer to automate this process if possible. Thanks 
I need to prohibit users from deleting Opportunity attachments via Notes & Attachments except system admin. I'm not a developer so any help is appreciated! Thanks so much.