• Nick Verschueren
  • NEWBIE
  • 70 Points
  • Member since 2021


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 13
    Questions
  • 9
    Replies

We have an integration for sending invoces to Navision. 
At the moment of invocing the WebserviceCallout We get the "Exception during callout: IO Exception: Exceeded max size limit of 12000000" Error...

The export does succeed, the invoice and file are uploaded in Navision

I've been trying to find the reason by checking heap sizes but I can't find why I get this error or how to fix it.

this is the method that keeps failing

public NavImport.SalesInvoices ImportSalesInvoices(NavImport.SalesInvoices mySalesInvoice) {
            IIBP.DebugLog asyncLogs = new IIBP.DebugLog('Start ImportSalesInvoices');
            asyncLogs.addDebugLog('heap size:' + limits.getHeapSize());
            NavImportCodeUnit.ImportSalesInvoices_element request_x = new NavImportCodeUnit.ImportSalesInvoices_element();
            request_x.mySalesInvoice = mySalesInvoice;
            NavImportCodeUnit.ImportSalesInvoices_Result_element response_x;
            Map<String, NavImportCodeUnit.ImportSalesInvoices_Result_element> response_map_x = new Map<String, NavImportCodeUnit.ImportSalesInvoices_Result_element>();
            response_map_x.put('response_x', response_x);
            asyncLogs.addDebugLog('heap size:' + limits.getHeapSize());
            try{
                WebServiceCallout.invoke(
                    this,
                    request_x,
                    response_map_x,
                    new String[]{endpoint_x,
                    'urn:microsoft-dynamics-schemas/codeunit/ImportWSManagement:ImportSalesInvoices',
                    'urn:microsoft-dynamics-schemas/codeunit/ImportWSManagement',
                    'ImportSalesInvoices',
                    'urn:microsoft-dynamics-schemas/codeunit/ImportWSManagement',
                    'ImportSalesInvoices_Result',
                    'NavImportCodeUnit.ImportSalesInvoices_Result_element'}
                  );
            }
            catch (Exception e) {
                asyncLogs.addErrorLog('Exception during callout: ' + e.getMessage());
            }
            asyncLogs.addDebugLog('heap size:' + limits.getHeapSize());
            response_x = response_map_x.get('response_x');
            asyncLogs.addDebugLog('heap size:' + limits.getHeapSize());
            asyncLogs.flush();
            return response_x.mySalesInvoice;
        }
And this is the debug result
2023-08-30 11:31:19 | DEBUG | Start ImportSalesInvoices
2023-08-30 11:31:19 | DEBUG | heap size:5817
2023-08-30 11:31:19 | DEBUG | heap size:6157
2023-08-30 11:31:22 | ERROR | Exception during callout: IO Exception: Exceeded max size limit of 12000000
2023-08-30 11:31:22 | DEBUG | heap size:6451
2023-08-30 11:31:22 | DEBUG | heap size:6541

Can anyone help me fix this issue? Everything arrives fine in Navision but I can't see this in Salesforce since I always get this error, so following code does not executed properly and invoices remain "unsent" in our SF.

Hi,

we use VScode to develop, and we have it set to automatically deploy a file when it is saved.

Now today after updating the SFDX extensions, when we save, he tries to do force:source: instead of the deploy function. 

This gives a lot of conflicts which we were able to fix with first doing the source:pull, but this pull way to many files int our vscode, every object and setting, we don't want to overflow ourd repo's with all this data that we do not need. and it is SOOOOOOO SLOW that is makes working very unpleasant.

We can still use the deploy when we right click and choose, "deploy source to org", but we just want vscode to keep doing this when we save a file. This change has cost us too much time for something we don't want to use.

How can I have vscode keep using the deploy function on save instead of the push?

Hi,

we have EAC enabled, and when adding attendees to an event, they automatically get an invite email that is send EAC. ( https://help.salesforce.com/s/articleView?id=sf.aac_event_sync_attendees.htm&language=en_US&type=5 )

How do we customize this email? we woul like to give this invite email a custom layout and text.

We have a managed package that contains a few global interface classes. These classes are extended within the package but can also be extended after installation in the target org.

These interfaces are chained.

Interface D extends interface C extends interface B extends interface A, which is the base Interface. 

And Class D implements interface D
Class C implements interface C
And so on, you get the picture...

All interface classes are used as implementations.

But now we want to add methods to one of the interfaces, let's say B in our example.

This is not possible since we can't add new methods to an interface class. But we need ot inject some methods here for new funcionality.

What would be the best way to go about this? We can't just add them to Class B because we cast the class instances as an instance of the interfaces and then we get an error that object of type interface B doesn't have the method we just added, which makes sense since it's not added to the interface class itself...

We have a script that does a HTTP callout to create a PDF, the callback saves this PDF in Salesforce as a document.

We have this working for multiple objects and this works fine. But for one type, one user, has an error that we can't seem to resolve.

The user is a System admin, other system admins can run it without issues, even profiles with less rights (sales user) can run it without issue.

But whenever this user runs it, he gets this error that we don't understand:
 

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, common.exception.SqlNoDataFoundException: ERROR: query returned no rows
Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement
SQLException while executing plsql statement: {?=call ContentFolders.get_root_fdr_details(?)}(07H09000000D1Dj)
SQLState: P0002
Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement
File: plsdb_exec.c, Routine: exec_stmt_execsql_body, Line: 3307
[conn=STANDARD:1:1:108918:1]: []
Class.HttpCallout.processContract: line 77, column 1
the code it fails on is this:
Callout calloutObj = (Callout)JSON.deserialize(calloutString, Callout.class);

HttpRequest req = setupHttpRequest(calloutObj);
HttpResponse res = makeRequest(req);

Quote q = [SELECT Name FROM Quote WHERE Id= :recordId LIMIT 1];
ContentVersion conver = new ContentVersion();
conver.ContentLocation = 'S';
conver.PathOnClient = 'Contract.pdf';
conver.Title = 'Contract_' + q.Name;
conver.VersionData = res.getBodyAsBlob();
conver.Type__c = 'Contract';
insert conver;  <=== Line 77

As I said, works fine for everyone, but this one specific user we get this error. 

Anyone an idea how to fix this? We don't even understand the error completely...

I want to add a choice to a picklist in a screen in a flow.
This choice is made identically to other choices, except the label and value ofcourse, and I'm able to add this choice to a picklist in screen 1.

But when trying to add the choice to another picklist in another screen, SF flips, gives errors and sais I have no value...

 

Save your flow and refresh the page. If the problem persists, contact Salesforce Customer Support. Error ID: 1741786242.

If you're working on a screen component, check your component configuration for invalid values.
Uncaught Error: could not replace position -1 with [object Object], something went wrong throws at https://XXXXXXXX--dev.lightning.force.com/auraFW/javascript/hXQ6H-x_YQB1RZ2gyQB4Mg/aura_prod.js:21:29238
this is a choice with no issues:
User-added image

This is the choice that gives the issue, as far as I can see, nothing wrong with it as it is the same as the first one

User-added image


When Trying to add the choice to a picklist I get this:
User-added image

If I click them away and try to save I get this:
User-added image
Hi,

We have an issue with a ke field dat can't be edited, although it should be editable, and is editable on other places.

When clicking edit next to the key fields in the path on an opportunity
User-added image

We  not able to change the field "main won reason" because it is grayed out, if it already has a value then that value is shown but no other options are shown. User-added image
But if we want to edit this in de details page instead of the key fields, all is fine and all options are shown and we can change the value.

User-added image

All profile have read and write right to this field and we can't find where this issue is comming from...

Hi,

we have a php application that connects to SF with the php soap toolkit (https://github.com/developerforce/Force.com-Toolkit-for-PHP)
But this uses username and password to make a connection with SF and we prefer not to use user info for this but a connected app. I did found this: https://meltedwires.com/2016/03/07/connecting-to-salesforce-using-oauth-2-0-from-php/ but we can't get this to work plus it also does not really explain properly how to work with queries after you are connected.

Is there a clear and comprehensive tutorial that explains how to connect to SF in PHP with a connected App? or could someone point me in the right direction?

Many thanks in advance.

Hi,

we have a scheduler implementation, we addes a site that gives access from a remote site to the schedulder "inbound new guest sales appointment" 

We added this code to a site page on the website that needs to show the flow:
<script src="https://SITENAME.force.com/bookings/lightning/lightning.out.js"></script>
<script>
    $Lightning.use("runtime_appointmentbooking:lightningOutGuest",
        function() {                  // Callback once framework and app load
            $Lightning.createComponent(
                "lightning:flow",    // top-level component of your app
                { },    // attributes to set on the component when created
                "lexcontainer",    // the DOM location to insert the component
                function(component) {            // API name of the Flow
                    component.startFlow("Inbound_New_Guest_Sales_Appointment");
                }
            );
        },    'https://SITENAME.force.com/bookings'  // Site endpoint
    );
</script>

but when we go to the page that we created, we get this error:
 
Something went wrong with the "ApointmentTopicsLWC" screen component on the "Inbound New Guest Sales Appointment" flow. Contact your Salesforce admin about this error. Cannot read properties of undefined (reading 'adapter')
This page has an error. You might just need to refresh it. [NoErrorObjectAvailable] Script error.

I think it's some kind of rights issue, but we are not able to find what the issue is exactly and how to fix it...
 
Hi,

We have a very simpel standard object.
  • An autonumber for the name
  • A textfield for a unique string (length 18)
  • A phone number field
  • A date field

Plus ofcourse the standard created by etc...
No track activities or track field history, only reports and search and the sharing and API access enabled

Now we are populating this object with data from an outside source, we want to import about 1,5 milion records. This is about 60MB of data on our external database. 
But when imported only a third we were already at 1Gig of storage space in Salesforce, that would mean that all 1,5 million lines would be arround 3Gig of data. I understand that some meta data is stored, but going from 60MB to 3Gig to store a few fields of data?

Are we doing something wrong? Why is SF using this amount of storage for this simple request?

Hi, I have following code, it's not much yet but I was trying to make a batch class. I just made the query and wanted to deploy to see if it works.
global class KBO_Batch implements Database.Batchable<sObject> {

    global Database.QueryLocator start(Database.BatchableContext bc) {
        return Database.getQueryLocator([SELECT Id FROM KBO_data]);
    }

    global void execute(Database.BatchableContext bc, List<IttesIT_KBO_data> records){
        // process each batch of records
    }

    global void finish(Database.BatchableContext bc){
        // execute any post-processing operations
    }
}

But when I deploy I get following message:
force-app\main\default\classes\KBO_Batch.cls  Class IttesIT_KBO_Batch must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>) (1:14)

I double checked, copied new examples from the tutorials, but still it gives me this error...

Hi,

I have a few api fucntions in an apex class that get called by the PHP soap client. Most functions work fine. But one does not receive parameters. And I can't see why.

php call:
$jsonString = '{"AccId":"0011x00001HlDMkAAN", "Naam":""}';
$wsParams=array('AccId'=>$jsonString);
		
print_r($wsParams);
$response = $client->Get_Quotes_For_Account($wsParams);

JSON and APEX
 

class JSON_ACC {
        public id AccId;
        public String Naam;
        public List<JSON_BUND> Bundels;
        public List<JSON_QUOTE> Quotes;
    }

webService static String Get_Bundles_For_Account( String AccID ) {
        JSON_ACC JAcc = (JSON_ACC)JSON.deserialize(AccID, JSON_ACC.class);

        **process and create response in JAcc JSON**

        return JSON.serialize(JAcc);

    }

I get an error on the deserialize line
Ooop! Error: System.NullPointerException: null input to JSON parser Class.System.JSON.deserialize: line 15, column 1 Class.API.Get_Quotes_For_Account: line 927, column 1
If I output the incoming string I see that it it completely empty so the string is not passed from PHP to the Apex API. This way of working works fine for quote and product functions etc... But for some reason I can't pass this parameter to this function and I have no idea why. Could someone point me in the right direction?
I'm doing the Lightning Experience Reports & Dashboards Specialist Superbadge and all was going fine, did a big part of the challenges, and suddenly while doing the dashboard, I get this error and can't seem to get past it....

"Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: UXHPPPDB"
User-added image
Is there a way to fix this without having to start all over again in a new playground?
I'm doing the Lightning Experience Reports & Dashboards Specialist Superbadge and all was going fine, did a big part of the challenges, and suddenly while doing the dashboard, I get this error and can't seem to get past it....

"Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: UXHPPPDB"
User-added image
Is there a way to fix this without having to start all over again in a new playground?

We have a script that does a HTTP callout to create a PDF, the callback saves this PDF in Salesforce as a document.

We have this working for multiple objects and this works fine. But for one type, one user, has an error that we can't seem to resolve.

The user is a System admin, other system admins can run it without issues, even profiles with less rights (sales user) can run it without issue.

But whenever this user runs it, he gets this error that we don't understand:
 

System.DmlException: Insert failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, common.exception.SqlNoDataFoundException: ERROR: query returned no rows
Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement
SQLException while executing plsql statement: {?=call ContentFolders.get_root_fdr_details(?)}(07H09000000D1Dj)
SQLState: P0002
Where: PL/sdb function doc.contentfolders.get_root_fdr_details(character varying) line 16 (SFSQL 286) at SQL statement
File: plsdb_exec.c, Routine: exec_stmt_execsql_body, Line: 3307
[conn=STANDARD:1:1:108918:1]: []
Class.HttpCallout.processContract: line 77, column 1
the code it fails on is this:
Callout calloutObj = (Callout)JSON.deserialize(calloutString, Callout.class);

HttpRequest req = setupHttpRequest(calloutObj);
HttpResponse res = makeRequest(req);

Quote q = [SELECT Name FROM Quote WHERE Id= :recordId LIMIT 1];
ContentVersion conver = new ContentVersion();
conver.ContentLocation = 'S';
conver.PathOnClient = 'Contract.pdf';
conver.Title = 'Contract_' + q.Name;
conver.VersionData = res.getBodyAsBlob();
conver.Type__c = 'Contract';
insert conver;  <=== Line 77

As I said, works fine for everyone, but this one specific user we get this error. 

Anyone an idea how to fix this? We don't even understand the error completely...
Hi,

We have an issue with a ke field dat can't be edited, although it should be editable, and is editable on other places.

When clicking edit next to the key fields in the path on an opportunity
User-added image

We  not able to change the field "main won reason" because it is grayed out, if it already has a value then that value is shown but no other options are shown. User-added image
But if we want to edit this in de details page instead of the key fields, all is fine and all options are shown and we can change the value.

User-added image

All profile have read and write right to this field and we can't find where this issue is comming from...

Hi,

we have a php application that connects to SF with the php soap toolkit (https://github.com/developerforce/Force.com-Toolkit-for-PHP)
But this uses username and password to make a connection with SF and we prefer not to use user info for this but a connected app. I did found this: https://meltedwires.com/2016/03/07/connecting-to-salesforce-using-oauth-2-0-from-php/ but we can't get this to work plus it also does not really explain properly how to work with queries after you are connected.

Is there a clear and comprehensive tutorial that explains how to connect to SF in PHP with a connected App? or could someone point me in the right direction?

Many thanks in advance.

Hi!

I am trying to create a formula for my report using IF,AND function. But the parameters that I need to tally isn't available on the Fields tab for Row Level Formula.User-added imageformula should be if column 1,2,3 is true and column 4 is false = "PASS" 
Hi guys,

I'm trying to build automation but struggling to find the right design here.
Once a Case has been updated to a Status "A", I would like to start counting the days to send an Email 3 days later.
If the status is changed to another, it will reset the counter back to 0.

Thank you for your help
  • March 01, 2022
  • Like
  • 0
How to calculate the total number of hours that can be used on a project? 
  • I created a number field for "total amount of hours"
  • another number field for " hours used"
  • and a formula for "hours available" 
This calculates the number of "hours available" but the unit of measure is not in hours, how can I get "time" as a formula return type?
Hi, I have following code, it's not much yet but I was trying to make a batch class. I just made the query and wanted to deploy to see if it works.
global class KBO_Batch implements Database.Batchable<sObject> {

    global Database.QueryLocator start(Database.BatchableContext bc) {
        return Database.getQueryLocator([SELECT Id FROM KBO_data]);
    }

    global void execute(Database.BatchableContext bc, List<IttesIT_KBO_data> records){
        // process each batch of records
    }

    global void finish(Database.BatchableContext bc){
        // execute any post-processing operations
    }
}

But when I deploy I get following message:
force-app\main\default\classes\KBO_Batch.cls  Class IttesIT_KBO_Batch must implement the method: void Database.Batchable<SObject>.execute(Database.BatchableContext, List<SObject>) (1:14)

I double checked, copied new examples from the tutorials, but still it gives me this error...

I'm doing the Lightning Experience Reports & Dashboards Specialist Superbadge and all was going fine, did a big part of the challenges, and suddenly while doing the dashboard, I get this error and can't seem to get past it....

"Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: UXHPPPDB"
User-added image
Is there a way to fix this without having to start all over again in a new playground?
Is it still possible to customize Lookup Dialog Layout in Lightning Experience? Salesforce documentation says you should edit lookup dialog in an objects Search Layouts but that option isn't available anymore in Lightning Experience