• George Laird 55
  • NEWBIE
  • 40 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies
Hello, 

I'm building a flow and i need to strip an ID from a response.  Could someone help me with a formula that will take this text...

{"data":425478,"responseId":"154b3a3447a0","timeStamp":"2023-06-21T17:56:13.6865742+00:00","httpStatusCode":201,"isOk":true,"messages":[{"httpStatusCode":201,"messageCode":"CREATED","title":"Item was created","detail":"Call Report 425478 created","isOk":true}],"maxMessageIndex":0,"_v":"AD"}

...and return only the 6 digit ID from after the "data": 

So in the above example i would want 425478 returned only. 

Thanks in advance!  
 
Hello Everyone!  

I have a lookup field on Opportunity called "Affiliate."  This points to a custom object called "Affiliate."   The business needs a notification when this field has a unique value for the first time.  

So, let's say we have three Affiliate names, "Cat", "Dog", and "Bird."    We have an Account called "Big Company Inc" and we have many opportunities being pushed via ETL tool every day.  Some of these opptys have a value for "Affiliate."   Let's say that in the past year we have had Opptys with Affilates "Cat" and "Dog" many times, but never "Bird."

The first time an oppty is pushed with a lookup value "Bird" for Affiliate, they need to know.  What is the best way to acomplish?

I want to stay away from triggers becuase we have thousands of records being inserted and updated every hour from the ETL tool.  Here's what I was thinking:

Maybe create a one time job to concatinate all values from this lookup into a text field seperated by commas.  Then write a batch job that take every opportunity with a value for Affilate that came in that day, check the values against the text field and if one is new, send the notification.   Am i over thinking this?

Thanks in advance!!!!!   Can't wait to mark "best answer!"
G
Hello All,

I've seen a few posts on this but nothing works so here goes....

I want to create a button from a record page that will filter the report based on the record ID where the button is, and automatically download it to .csv or .xls

I've created the button and before even attempting the filter, I just tried to get it to download but it's not working.  It loads the report but does not start download. 

Does anyone know how to do this?

User-added image

 
Hello All,

I'm struggling to find a good example of someone using the TabCRM External Data API from somewhere other than Salesforce.  I'm looking for a Postman collection or something, anything!!!   

We are trying to push data from an on prem, mySQL database.  They want to use an ETL tool that can call a REST api to push the data.  I can't find any examples of connecting to salesforce via REST and using that External Data API.

Does anyone out there have an example using Postman or C# or anything other than APEX to call this API and push data into TabCRM?

Anything would help!
George
 
Hey Everyone,

I wanted to get people's ideas on how to solve for this.  It's kind of a cool idea, and I'm sure there is more than one way to do it. 

Use Case:  Sometimes we need to send an emergency message to all Salesforce users.  Want to be able to type a message and have it show up on every single salesforce screen/page with neon flashing red letters.  An example would be when our APIs are down, we want people to stop using salesforce until they are back up.  Emails are slow and no one reads them.  Wouldn't it be cool if we could type a message and have it show up on every single salesforce page at the top in flashing red letters?   

What's the best way to do this?  Any cool ideas?
Ok, here's one for you experts out there.  I have to make a callout to get leads from a third party.  The problem is that I have to pass a parent ID to this GET method that will retun the leads for that parent ID.  The problem is that I have to make a seperate call for each parent ID.  I know, it's silly but they don't have a way to just pass an array of all the parentIDs and get back a list of leads in one call.  

So, the company wants this job to run at night and get all the leads from all the parentIDs.   I know from the past that I can't have more than like 10 callouts in a transaction or something like that. 

So, how can I do this?   How can I create a batch job that makes a seperate callout for each parentID?   

Thank you in advance!
Hello.  I'm trying to write a trigger that will insert a complted task whenever a Note is inserted.  This is using the newer notes feature, not the old school one.   The problem I'm having is that the new task is not being related to the same record that the note is.  The note has a "related to" field when you are typing the note.  I think that that field is actually "LinkedEntityId" field.  The problem is that when the trigger runs, that field is referencing a user.  I was told that the trigger may run multiple times and after you actually save the note, "LinkedEntityId" becomes the related record, but I'm not seeing that happen.  Here is my trigger:

I've also attached a screen shot of the code for better readability.
Trigger Code



trigger NewNoteCreatesTaskTrigger on ContentVersion (after insert) {

    List<Task> tasks = new List<Task>();
    string userId = [SELECT Id FROM User WHERE Id = : UserInfo.getUserId()][0].Id;
    ContentDocumentLink rr;
    Id cId;

    for(ContentVersion n : Trigger.New){

        if(n.FileType == 'SNOTE'){

            cId = n.ContentDocumentId;
            
        }
    }

    List<ContentDocumentLink> cCont = [SELECT Id, ContentDocumentId, ContentDocument.Title, ContentDocument.FileType, LinkedEntityId, ShareType, Visibility FROM ContentDocumentLink where ContentDocumentId =: cId];
    system.debug(cCont);

    for(ContentDocumentLink z : cCont){

        String myIdPrefix = String.valueOf(z.LinkedEntityId).substring(0,3);
        
        if(myIdPrefix != '005'){

             rr = z;

        }

    }


    if(rr != null){

        task t = new task();
        t.WhatId = rr.LinkedEntityId;
        t.ActivityDate = system.today();
        t.OwnerId = userId;
        t.Priority = 'Low';
        t.Status = 'Completed';
        t.Subject = 'New Note Created';
    
        try {
    
            insert t;
    
        } catch (DmlException e) {
    
            Messaging.SingleEmailMessage mail=new Messaging.SingleEmailMessage();
            String[] toAddresses = new String[] {'george.laird@amtrustgroup.com'};
            mail.setToAddresses(toAddresses);
            mail.setReplyTo('myemailgoeshere');
            mail.setSenderDisplayName('Apex error message');
            mail.setSubject('Error from Org : ' + UserInfo.getOrganizationName());
            mail.setPlainTextBody(e.getMessage());
            Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
        }
    
    }
    
}

 
Hello All,

I have an email address on the Oppty object.  Users want to be able to send list email just like the Contact list views, but on the Opportunity list views.  They want to be able to select mulitiple opptys from the list view, click a button, and have the regular email editor open, populated with all of the email addressess that they checked form the list view, and have all of the regular options like selecting a template, merged fields, ect...

What is the best way to do this?

A list view button with a URL hack? Please help. 

George
 
Hello, 

I'm building a flow and i need to strip an ID from a response.  Could someone help me with a formula that will take this text...

{"data":425478,"responseId":"154b3a3447a0","timeStamp":"2023-06-21T17:56:13.6865742+00:00","httpStatusCode":201,"isOk":true,"messages":[{"httpStatusCode":201,"messageCode":"CREATED","title":"Item was created","detail":"Call Report 425478 created","isOk":true}],"maxMessageIndex":0,"_v":"AD"}

...and return only the 6 digit ID from after the "data": 

So in the above example i would want 425478 returned only. 

Thanks in advance!  
 
Hello All,

I'm struggling to find a good example of someone using the TabCRM External Data API from somewhere other than Salesforce.  I'm looking for a Postman collection or something, anything!!!   

We are trying to push data from an on prem, mySQL database.  They want to use an ETL tool that can call a REST api to push the data.  I can't find any examples of connecting to salesforce via REST and using that External Data API.

Does anyone out there have an example using Postman or C# or anything other than APEX to call this API and push data into TabCRM?

Anything would help!
George
 
Ok, here's one for you experts out there.  I have to make a callout to get leads from a third party.  The problem is that I have to pass a parent ID to this GET method that will retun the leads for that parent ID.  The problem is that I have to make a seperate call for each parent ID.  I know, it's silly but they don't have a way to just pass an array of all the parentIDs and get back a list of leads in one call.  

So, the company wants this job to run at night and get all the leads from all the parentIDs.   I know from the past that I can't have more than like 10 callouts in a transaction or something like that. 

So, how can I do this?   How can I create a batch job that makes a seperate callout for each parentID?   

Thank you in advance!
Hello All,

I have an email address on the Oppty object.  Users want to be able to send list email just like the Contact list views, but on the Opportunity list views.  They want to be able to select mulitiple opptys from the list view, click a button, and have the regular email editor open, populated with all of the email addressess that they checked form the list view, and have all of the regular options like selecting a template, merged fields, ect...

What is the best way to do this?

A list view button with a URL hack? Please help. 

George
 

Hi,

 

I am getting this error when I make REST calls .

System.AsyncException: Future method cannot be called from a future or batch method: Myfutureclass.method(LIST<Id>)

This is a trigger which calls that class which has future method and calls REST calls.

 

trigger checkcase on Case (after insert,after update) {
List<Id> caseIds = new List<Id>();
for(Case c : Trigger.New)
{
if(c.Checkbox__c)
{
caseIds.add(c.Id);
System.debug('*********Caseid'+CaseIds);
}
}
System.debug('***********Trigger.new'+trigger.new);
System.debug('***********Trigger.old'+trigger.old);
if(caseIds.size() > 0){
if(Trigger.isinsert){
Myfutureclass.method(caseIds);
}
if(trigger.isUpdate ){
if(trigger.old[0].Checkbox__c){
Myfutureclass.method(caseIds);
}
}
}
}

 

Please correct me what i am missing??Please