• David Tissen 7
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 2
    Questions
  • 10
    Replies
I want to add Custom Links in our custom app which references Salesforce Records in the same way salesforce does.

Therefor I want the same behaviour like in other records: If you hover over the link the Compact Layout is used to display the Record as Tooltip.

How can be this achived?

I would like to use the salesforce build in functions.
I think I could create also a tooltip with embeded html as described from w3s (https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_js_tooltip_html&stacked=h)

Is it possible to utilize the salesforce functions?
If not which would be the best approach?
Hi everybody,

I'm trying to package a connected app using SFDX. I'm aware that connected apps are only allowed for managed Packages.
The issue: I have a managed Package! 
 
PS C:\Users\XXX\Documents\GIT\sf.XXXX> sfdx force:package:version:create --package "XXXXX" -x --definitionfile config/project-scratch-def.json --wait 10 -v dldcDevHub 
Request in progress. Sleeping 30 seconds. Will wait a total of 600 more seconds before timing out. Current Status='Queued' 
Request in progress. Sleeping 30 seconds. Will wait a total of 570 more seconds before timing out. Current Status='Initializing' 
Request in progress. Sleeping 30 seconds. Will wait a total of 540 more seconds before timing out. Current Status='Verifying features and settings' 
ERROR running force:package:version:create: XXX: Installing an app (XXX) that has been deleted.



I've searched for hours, no solution. What could be the reason?

Have some code in VS Code, received from a scratch org with enabled Community(Digital Experiences). Want this to push to a new scratch org. "Push Source to Default Scratch Org" always fails with exit code 1
SfdxError: 
<html> <body>
<table cellspacing=10><tr><td><span style="font-weight: bold; font-size: 12pt;">Illegal Request</span></td></tr>
    <tr<td>You have sent us an Illegal URL or an improperly formatted request.</td></tr>
    <tr><td></td></tr></table>
<!-- Body events -->
<script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script></body></html>

Tried a lot, but still have no clue: minimal project-scratch-dev.json, CLI latest version (7.92) and also an older; Has someone an idea where to look for error reason? Any help would be greatly appreciated.

  • March 24, 2021
  • Like
  • 0
Hi everybody,

I'm trying to package a connected app using SFDX. I'm aware that connected apps are only allowed for managed Packages.
The issue: I have a managed Package! 
 
PS C:\Users\XXX\Documents\GIT\sf.XXXX> sfdx force:package:version:create --package "XXXXX" -x --definitionfile config/project-scratch-def.json --wait 10 -v dldcDevHub 
Request in progress. Sleeping 30 seconds. Will wait a total of 600 more seconds before timing out. Current Status='Queued' 
Request in progress. Sleeping 30 seconds. Will wait a total of 570 more seconds before timing out. Current Status='Initializing' 
Request in progress. Sleeping 30 seconds. Will wait a total of 540 more seconds before timing out. Current Status='Verifying features and settings' 
ERROR running force:package:version:create: XXX: Installing an app (XXX) that has been deleted.



I've searched for hours, no solution. What could be the reason?
Hey Everyone,
I'm new here and have a HUGE issue. The company I'm working with is trying to verify and give access to users through their test.salesforce page.  They want me to post to the address above, with given variables (client_id, client_secret, username, password, and grant_type).  My company is basically the middle man for allowing two systems to communicate, so we need to get the returned information after posting to the test.salesforce link and use the access_token & token_type to help pass the user through the other system. I'm using AJAX to post to the URL and everything is set up properly.  Our server is an outside server, so wer are getting a CORS error saying there is No 'Access-Control-Allow-Origin' header is present on the requested resource. So our url is therefore not allowed access.  I have told them to whitelist our server but that hasn't helped. I've looked up information on this and it appears that CORS is somewhat of an issue with salesforce and it sounds like these guys are treating this as a pure API.  I'm new to salesforce and need help in any way shape or form. I know my ajax response is set up properly and I've tried all the other ajax solutions, I guess I'm just looking for someone to either tell me they're able to do this and the method used, or someone to say we can't do this.
Thanks Everyone!
I am implementing an EmailService. I would like to store the emails I receive as an EmailMessage that would show up on the ActvityHistory for a record like Contact or Account. To do that I wrote the following code (treat it as pseudo code) : 

Task emailTask = new Task (
            ActivityDate  = Date.today(),
            Description   = results.getEmailBodyAsText(),
            // IsArchived    = False, -- This is not writable
            IsRecurrence  = False,
            IsReminderSet = False,
            OwnerId       = results.getPrimaryUser().Id,
            Priority      = 'High',
            Status        = 'Open', // Revisit this - We should check if an email requires response
            Subject       =    results.getSubject(),
            TaskSubType   = 'Email',
            WhoId         =  results.getPrimaryContact().Id
        );


        insert emailTask; // This will provide an Id
        // Notes: Salesforce Requires a Task be Present to associate
        // with it an EmailMessage. Email Message provides a cleaner
        // looking inteface for Emails
        EmailMessage emailMessage = new EmailMessage(
            ActivityId  = emailTask.Id,
            FromAddress = ((Contact)results.getSender()).Email,
            FromName    = ((Contact)results.getSender()).Name,
            Incoming    = False,
            MessageDate = Date.today(),
            Subject     = results.getSubject()
        );
        insert emailMessage;

Where "results" is an object that is created from parsing the Inbound Email (Some decoupling from that Object).  When I do this I get the following error - 
Line: 42, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, You cannot edit this field: [ActivityId]

Based on the document on EmailMessage it appears that ActivityId is the Id of the task that the email replaces in the ActivityHistory. I would like to use the EmailMessage object because it looks much cleaner than a Task that is of an Email SubType. Any ideas how to get this to really work?
This should be simple, but I can't figure it out. How do I add a second to a date and time field in a formula? I have a 'end' date and time field. I want my formula field to show 'next' available date and time. The next available should be one second from end date and time.
I am getting this error: The number of results does not match the number of interviews that were executed in a single bulk execution request.
Here is the apex class I am using, I want to store list<string> data from a json file into a flow variable:
global class par{

    global static List<string> l = new list<string>();
    
@InvocableMethod(label='Get Map' description='Returns the values of Maps')
    global static List<String> CallMap(){
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=AIzaSyBOyIQi54LMykmzSOvCuQ2naVvVQEsEfHw');
        req.setMethod('GET');
        Http http = new Http();
        HTTPResponse res = http.send(req);
        JSONParser parser = JSON.createParser(res.getBody());
        while (parser.nextToken()!= null)
        {
            if ((parser.getCurrentToken() == JSONToken.FIELD_NAME))
            {
                    string fieldName = parser.getText();
                    parser.nextToken();
                if(fieldName == 'place_id')
                {
                    string place = parser.getText();
                    system.debug(place);
                    l.add(place);
                	parser.nextToken();
                }else if(fieldName == 'status')
                	{
                    string status = parser.getText();
                    system.debug(status);
                    l.add(status);
                    }
        	}
    	}
        return l;
    }
}



 

 
Hello everybody, help me please!
I finished developing integration "MyApp->Salesforce". I want to make my app global and put it on App Exchange. In the end I want to get something like that: https://appexchange.salesforce.com/listingDetail?listingId=a0N30000001rmjpEAA  - when somebody presses "Install" it redirects to my website.
I'm using .NET application with Oauth. I read that I need to create a package to make app global. So here I got my app:
User-added image
And I'm trying to make a package, but there's no my app in apps list. Also my package is not "managed" by default and I can't change check there.
User-added image
Help me please, maybe I'm missing something? I really don't get it.
 

Anyone know of a way to get the Week of the Month (number 1 to 5 depending on month/calendar) in Apex Classes?

If there is custom code that someone has built, please let me know.  THANKS.

 

 

I only found Day of Year for the Salesforce datetime methods.

 

example:  Day of Year

 

Datetime myDate = datetime.newInstance(2008, 2, 5, 8, 30, 12);
system.assertEquals(myDate.dayOfYear(), 36);
Hey Everyone,
I'm new here and have a HUGE issue. The company I'm working with is trying to verify and give access to users through their test.salesforce page.  They want me to post to the address above, with given variables (client_id, client_secret, username, password, and grant_type).  My company is basically the middle man for allowing two systems to communicate, so we need to get the returned information after posting to the test.salesforce link and use the access_token & token_type to help pass the user through the other system. I'm using AJAX to post to the URL and everything is set up properly.  Our server is an outside server, so wer are getting a CORS error saying there is No 'Access-Control-Allow-Origin' header is present on the requested resource. So our url is therefore not allowed access.  I have told them to whitelist our server but that hasn't helped. I've looked up information on this and it appears that CORS is somewhat of an issue with salesforce and it sounds like these guys are treating this as a pure API.  I'm new to salesforce and need help in any way shape or form. I know my ajax response is set up properly and I've tried all the other ajax solutions, I guess I'm just looking for someone to either tell me they're able to do this and the method used, or someone to say we can't do this.
Thanks Everyone!
I am implementing an EmailService. I would like to store the emails I receive as an EmailMessage that would show up on the ActvityHistory for a record like Contact or Account. To do that I wrote the following code (treat it as pseudo code) : 

Task emailTask = new Task (
            ActivityDate  = Date.today(),
            Description   = results.getEmailBodyAsText(),
            // IsArchived    = False, -- This is not writable
            IsRecurrence  = False,
            IsReminderSet = False,
            OwnerId       = results.getPrimaryUser().Id,
            Priority      = 'High',
            Status        = 'Open', // Revisit this - We should check if an email requires response
            Subject       =    results.getSubject(),
            TaskSubType   = 'Email',
            WhoId         =  results.getPrimaryContact().Id
        );


        insert emailTask; // This will provide an Id
        // Notes: Salesforce Requires a Task be Present to associate
        // with it an EmailMessage. Email Message provides a cleaner
        // looking inteface for Emails
        EmailMessage emailMessage = new EmailMessage(
            ActivityId  = emailTask.Id,
            FromAddress = ((Contact)results.getSender()).Email,
            FromName    = ((Contact)results.getSender()).Name,
            Incoming    = False,
            MessageDate = Date.today(),
            Subject     = results.getSubject()
        );
        insert emailMessage;

Where "results" is an object that is created from parsing the Inbound Email (Some decoupling from that Object).  When I do this I get the following error - 
Line: 42, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_OR_READONLY, You cannot edit this field: [ActivityId]

Based on the document on EmailMessage it appears that ActivityId is the Id of the task that the email replaces in the ActivityHistory. I would like to use the EmailMessage object because it looks much cleaner than a Task that is of an Email SubType. Any ideas how to get this to really work?