Skip to main content Stream TDX Bengaluru on Salesforce+. Start learning the critical skills you need to build and deploy trusted autonomous agents with Agentforce. Register for free.

Feed

Connect with fellow Trailblazers. Ask and answer questions to build your skills and network.

We have had two instances in the past couple of months where two different Dataflows which were scheduled daily became unscheduled. No alerts in email, nothing in the Admin Audit file.  

 

Has anyone seen this? 

 

I have not raised a Case at yet, as I have no evidence or trail. 

 

I have not found anything in the Googleverse, except an known issue when the last updater user account is deactivated, which was not the case here. 

1 answer
0/9000

Hello, Do you create new specific funds for mini fundraising initatives that you ultimately want counted in your operating annual fund bucket? Ex. mini campaign to replace the roof. If you create a new specific fund, how do you ensure dollars are counted in your general annual operating fund? Do you give the new specific fund the same GL code and run reports on that? 

Thanks! 

 

#Trailhead Challenges  #Trailhead

0/9000

Hello, Do you run reports on GL code field or Specific Fund field or some other field when filtering on opportunites. For ex. a report pulling all annual fund LYBUNTs. 

TY! 

 

#Trailhead Challenges  #Trailhead

0/9000
1 answer
  1. Today, 2:49 AM

    Sure you can do with flow or trigger or app exchange app. 

     

    1. Create a Record-Triggered Flow: 

    Object: ContentDocumentLink 

    Trigger: When record is created 

    Check CreatedBy User 

    Create Chatter Post (Action Element): 

    Use the Post to Chatter action. 

    2.If Flow isn’t enough or you need @mentions, you can consider an Apex trigger on ContentDocumentLink

    trigger NotifyOnFileUpload on ContentDocumentLink (after insert) {

    for (ContentDocumentLink link : Trigger.new) {

    if (link.CreatedBy.Name == 'Test User' ) { // check Uploaded User

    FeedItem post = new FeedItem();

    post.ParentId = link.LinkedEntityId;

    post.Body = 'A new file has been uploaded.';

    post.Type = 'TextPost';

    insert post;

    }

    }

    }

    3. App Exchange, you can search in market place

0/9000

I'm trying to calculate a formula but am not getting the same results as I would expect. 

Here's my explanation:

https://screenrec.com/share/xsOLA7jb2S

 

 

This is the formula:  

((Account.Internal_Price_Month__c * Account.Internal_Seats__c) + (Account.External_Price_Year__c / 12)) - Account.Monthly_Cost_to_Company__c 

 

As you can see, if the Externals are 0, then the whole result turns out to be 0:

https://screenrec.com/share/baFWr5nZ4l

 

 

While the same formula in XLS shows the correct results for all records: 

https://screenrec.com/share/oNU8FJ7VlQ

 

 

How can I account for the ones that might not have the Externals? 

 

#Reports & Dashboards

5 answers
  1. Apr 30, 12:13 PM

    So they're not really 0's they're actually blank/null?   

     

    Which option did you select for "

    Treat blank fields as..

    ." in your Formula?  It looks like you selected Treat them as BLANKS, not Zeroes.   

     

    In Salesforce Formulas you can't do Math with a Blank/Null value, because it is literally "nothing" and that "Breaks the Laws of Mathematics"  

     

    Try selecting "Treat blank fields as Zeroes"   

     

    So they're not really 0's they're actually blank/null? Which option did you select for

     

    Or if this is a Report Formula use the BLANKVALUE Function to provide a substitute value

0/9000

Hello, 

 

I came across a peculiar issue that did not make any sense to me. In order to connect to a custom Restful API, I had to implement an Oauth 1.0 with HMAC-SHA256 encryption which was successfully done. I then stored the URL in Custom Metadata types as a text(size=100) custom field. When I tried pull the custom metadata type URL field and generate the authorization code, I end up getting an error: 

Invalid Login Attempt

. Strangely, when I hardcode the URL into my method, it works fine with no issues.   

 

public static String generateOauthAuthorization(String httpMethod, String baseurl){        String oauthText = '';        String authorizationHeader;        Ouath1__mdt[] oauth1Data = [Select AccessToken__c, ConsumerKey__c, ConsumerSecret__c, Realm__c, TokenSecret__c From Oauth1__mdt Limit 1];        Map<String, String> oauthParams = new Map<String, String>();        oauthParams.put('oauth_consumer_key', oauth1Data[0].ConsumerKey__c);        oauthParams.put('oauth_token', oauth1Data[0].AccessToken__c);        oauthParams.put('oauth_signature_method', 'HMAC-SHA256');        oauthParams.put('oauth_timestamp', String.valueOf(System.now().getTime()/1000));        oauthParams.put('oauth_nonce', String.valueOf(Crypto.getRandomLong()).replaceAll('-','') + String.valueOf(System.currentTimeMillis()));        oauthParams.put('oauth_version', '1.0');        Map<String, String> urlSplittedValue = urlSplitter(baseurl); //splits the url into base url, and params        Map<String, String> allParams = oauthParams.clone();        allParams.put('script',urlSplittedValue.get('script'));        allParams.put('deploy',urlSplittedValue.get('deploy'));        System.debug(allParams);        List<String> sortedKeys = new List<String>(allParams.keySet());        sortedKeys.sort();        System.debug(sortedKeys);        for (String key : sortedKeys){            String encodedKey = EncodingUtil.urlEncode(key, 'UTF-8');System.debug(key);            String encodedValue = EncodingUtil.urlEncode(allParams.get(key), 'UTF-8');            oauthText += encodedKey + '=' + encodedValue + '&';        }        oauthText = oauthText.substring(0, oauthText.length() - 1);        System.debug('oauth text: ' + oauthText);        String baseString = httpMethod + '&' +                            EncodingUtil.urlEncode(urlSplittedValue.get('baseURL'), 'UTF-8') + '&' +                            EncodingUtil.urlEncode(oauthText, 'UTF-8');        System.debug('base text: ' + baseString);        String signingKey = EncodingUtil.urlEncode(oauth1Data[0].ConsumerSecret__c, 'UTF-8') + '&' +                            EncodingUtil.urlEncode(oauth1Data[0].TokenSecret__c, 'UTF-8');         System.debug('signingkey: ' + signingKey);        Blob baseStringBlob = Blob.valueOf(baseString);        Blob signingKeyBlob = Blob.valueOf(signingKey);        Blob hmac = Crypto.generateMac('HmacSHA256', baseStringBlob, signingKeyBlob);        String oauthSignature = EncodingUtil.base64Encode(hmac);        oauthParams.put('oauth_signature', oauthSignature);        oauthParams.put('realm', oauth1Data[0].Realm__c);        authorizationHeader = 'OAuth ';        for (String key : oauthParams.keySet()){            authorizationHeader += key + '="' + oauthParams.get(key) + '",';        }        authorizationHeader = authorizationHeader.substring(0, authorizationHeader.length() - 1);        System.debug('Authorization: ' + authorizationHeader);        return authorizationHeader;    }

 

public static Map<String,String> urlSplitter(String urlText){        Map<String,String> urlSplit = new Map<String,String>();        List<String> urlPart = urlText.split('\\?');        String paramPart = (urlPart.size() > 1) ? urlPart[1] : '';        urlSplit.put('baseURL',urlPart[0]);        if (!String.isEmpty(paramPart)){            List<String> params = paramPart.split('&');            for (String param : params){                List<String> keyvalue = param.split('=');                urlSplit.put(keyvalue[0], keyvalue[1]);            }        }        return urlSplit;    }

 

This works:

request.setHeader('Authorization', generateOauthAuthorization('POST', 'https://domain.com/app/site/hosting/restlet.nl?script=1111&deploy=1')); 

 

These do not:

URLstore__mdt[] urlValue = [Select urltext__c From URLstore__mdt];request.setHeader('Authorization', generateOauthAuthorization('POST', urlValue[0].urltext__c));

 

String urlText1 = String.valueOf(urlValue[0].urltext__c);String authText = generateOauthAuthorization('POST', urlText1);request.setHeader('Authorization', authText);

 

String authText = generateOauthAuthorization('POST', String.valueOf(urlValue[0].urltext__c));request.setHeader('Authorization', authText);

 

Any idea what might be the possible issue here? Please note that the custom String variable 

baseString

 in the above code on comparison between working and failing scenerio showed that values are identical except for nounce, timestamp and signature which makes sense as they are unique fields. There are no special characters or spaces found in the custom metadata text field either. 

 

Regards, 

Shylesh 

 

#Apex  #Custom Metadata Types  #URL Query String  #Open Text Fields  #Oauth1 Authentication

0/9000

I'm currently trying to create an email template but after I insert my merged field and preview it on simple pdf it cuts off the words. I need it to wrap to the next line but I can't seem to figure it out. I saw a few things that said you can use <p> or <div> to get it to wrap but that's not working. It's only the text from the merged fields that aren't wrapping, my regular text that I enter in wraps. 

 

#Email Template  #TrailblazerCommunity  #Salesforce

1 answer
  1. Today, 2:41 AM

    you can use CSS to handle this. 

     Use the style attribute to force wrapping on your <div> or <p> tag:  

     

    <p style="word-wrap: break-word; overflow-wrap: break-word; white-space: normal;">

    {!YourMergeField}

    </p>

    <div style="word-wrap: break-word; overflow-wrap: break-word; white-space: normal;">

    {!YourMergeField}

    </div>

0/9000

Hi everyone, 

 

We’re working on a project where we need to integrate Salesforce with a Microsoft SQL Server database. The goal is to sync customers and orders data between the two systems on a regular basis, ideally with minimal manual work. 

 

If anyone has done something like this before, I’d really appreciate your insights or recommendations. 

 

#Integration  #Data Management

4 answers
0/9000

Every release adds a few event logs, like the logout event log. 

I was able to download the logout event log file using the event file browser. 

Regretfully, though, it is absent from event monitoring. Why?

0/9000