• Stefaan Somers 12
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 7
    Replies
I have a table where I add the following column :
{
    "label": "hasID",
    "fieldName": "IDStatus",
    "type": "text",
    "editable": false,
    "hideDefaultActions": true,
    "cellAttributes": {
      "iconName": {
        "fieldName": "IDStatus"
      }
    },
    "sortable": true,
    "initialWidth": 80
  },

But the problem is that it shows the icon but also the icon-value. How can I resolve this?
User-added image
 
Hi,

I have a scheduled flow where one of the conditions 
Condition
But when I run or debug, it gives me back records where even this field is filled in.

Any idea what I am doing wrong??
Hi,

I have a visualforce page where you can type in a search term.

In Apex code I want to search for this term in my Salesforce-records on all fields, so also in a multipick-list field.

For example, I have a multi-picklist field with the following values :
- Value Test
- Value Other
- Valuet Test2

So when I search on 'Test' I should retrieve the records that have the first or the third value.

How can this be obtained in SOQL or SOSL, making use of a bind expression
I have a DataLoader-job that is already running successfully for some years. Since a few weeks, I see in the logging 'Field mapping is invalid'.

The source is a query to a SQL table, where the concerned column is VARCHAR(1000)

The destination is Salesforce where the field is a Long Text Area.

The version of DataLoader is v38. There is nothing changed in destination or source, so no clue what may be causing the issue and I'm breaking my head for years now.

Any help for troubleshooting would be most welcome.
I have a lighting page with 2 columns.

First column :
Accordion

Second Column :
Tabs

I've been using Lighting Inspector in Chrom to see what happens.
From the inputer there I can conclude that te default tab of the second column only loads after all the different sections of the accordions are loaded.

Is this a correct conclusion? And if so what is the easiest way to resolve this. Is there a way to define which component loads first
I have an existing visualforce page, with a custom controller.
In the apex-code I'm using 
ApexPages.currentPage().getParameters().get('id')];

Now I'm calling this same VF page from the Utility-bar. Unfortunateley it doesn't have the context of the record-id.

How can I resolve the easiest way, so I can maintain most of the logic of the VF page?
In Classic Console you have an indication on which record you were working. This was very handy. For example take this scenario :
- I'm working on case A, and create a task for it
- Next I want to lookup something in another case, so a new tab is openen
- the star-icon still shows me on which case I was working
User-added image

In lightning we don't have this indicationUser-added imageIs there an alternative for this?
Hi,

in classic we used url hack to create a case with some lookup fields filled in. In that case you still had first the option to indicate the recordtype.

I now want this same functionality in Lightning. But if you want to provide default values like in record-edit-form, you need to specify the fields you want to see. But instead I want to use the page layout as linked to the record-type. We have about 60 page layouts, so I don't want to build up the screen for every page layout
Hi,

Im' using in lwc the following code : 
<lightning-record-form object-api-name={objectApiName} record-id={recordId} fields={fields} onsuccess= {handleSuccess} ></lightning-record-form>

After I went into edit, changed a value and saved the changes, I go back to the page where the record-form is in read-mode. But unfortunateley it doesn't contain the changed value. I need to refresh the whole page, to see the changes
Hi,

I have the following extension controller :
/**
 * Created by stefaans on 4/06/2019.
 */

public class BatchUpdatePositionsController {
    ApexPages.StandardSetController ctrl = null;
    public List<cxsrec__cxsPosition__c> positionsToUpdate = new List<cxsrec__cxsPosition__c>();
    public String jobId='';

    public BatchUpdatePositionsController(ApexPages.StandardSetController controller){
        if (ctrl ==null){
            ctrl = controller;
            if (!Test.isRunningTest()) ctrl.addFields(new List<String>{'RecordType.DeveloperName','cxsrec__Status__c','Company__r.name'});
            List<cxsrec__cxsPosition__c> positions = (List<cxsrec__cxsPosition__c>) ctrl.getSelected();
            System.debug('Number of requests to update :' + positions.size());
            for (cxsrec__cxsPosition__c position : positions) {
                if (position.RecordType.DeveloperName == 'XXX' && position.cxsrec__Status__c =='Open'){
                    position.cxsrec__Status__c              =   'XXX';
                    position.Channel_Vivaldis_website__c    =   false;
                    positionsToUpdate.add(position);

            }
                ctrl.setPageSize(positionsToUpdate.size());

            }
        }
    }

    public pageReference updateRequests(){
         AsyncBatchUpdate updateJob = new AsyncBatchUpdate(this.positionsToUpdate);
        ID jobID = System.enqueueJob(updateJob);
        System.debug('positionsToUpdate : ' + positionsToUpdate);
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.INFO, 'Aanvragen worden succesvol aangepast'));

        return null;
    }



}


This code just runs fine when I test it in the UI.
 

So now I've written the following test-class.
 

/**
 * Created by stefaans on 5/06/2019.
 */
@isTest
public class BatchUpdatePositionsControllerTest {
    static BatchUpdatePositionsController ext;

    @testSetup
    static void setup(){
        cxsrec__cxsLanguage__c lang = new cxsrec__cxsLanguage__c(Name='Nederlands',cxsrec__Code__c = 'nl_NL');
        insert lang;
        Account acct = Test_datafactory.createAccount('testAccount', 'Straat', '1', '1','3300','Tienen','xxxx', 'A01','memo');
        cxsrec__cxsFunction__c jobTemplate = Test_datafactory.createFunction('Consultant');
        Contact contact = Test_datafactory.createContact(acct, 'Jaspers');
        cxsrec__cxsPosition__c job = Test_datafactory.createJob(jobTemplate, acct, contact, 'Consultant', 'Open', 'A01');
        job.cxsrec__Language_rel__c = lang.Id;
        update job;
        cxsrec__cxsPosition__c job2 = Test_datafactory.createJob(jobTemplate, acct, contact, 'Consultant', 'Open', 'A01');
        job.cxsrec__Language_rel__c = lang.Id;
        update job2;

    }


    @isTest
    private static void updateRequests(){
        List<cxsrec__cxsPosition__c> jobs = [select id, name, cxsrec__Status__c, RecordType.DeveloperName from cxsrec__cxsPosition__c];
        Test.startTest();
        ApexPages.StandardSetController con = new ApexPages.StandardSetController(jobs);
        con.setSelected(jobs);
        ext = new BatchUpdatePositionsController(con);
        ext.updateRequests();
        Test.stopTest();
        System.assertNotEquals('',ext.jobId);
    }


}

But whe I run this test-class, I always get the error :
System.VisualforceException: Modified rows exist in the records collection!
External entry point

Any idea on how I can resolve this?
In Lightning Flow I have a variable with a list of records that need to be updated, which I fill through a loop. When I wan't to do the update, I always get the error : 
12:24:26.351 (504433867)|FLOW_ELEMENT_ERROR|LIMIT_EXCEEDED: Cannot have more than 10 chunks in a single operation. Please rearrange the data to reduce chunking.|FlowRecordUpdate|UpdateRecord
12:24:26.351 (504638795)|FLOW_ELEMENT_END|613991d2bb2c20ff3bc830ae528716b21ff7f9a-2d89|FlowRecordUpdate|UpdateRecord

But the variable of the list is specified as a list of a specific Object-type

 
Here is the source-code of my component :
<!--
 - Created by stefaans on 29/04/2019.
 -->

<aura:component description="DocumillDocuments" implements="forceCommunity:availableForAllPageTypes" access="global" controller="DocumillHelper">
    <aura:attribute name="objectType" type="String"/>
    <aura:attribute name="listDocuments" type="Documill_Template__mdt[]"/>

   <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
        <!-- PAGE HEADER -->
        <lightning:layout class="slds-page-header slds-page-header--object-home">
            <lightning:layoutItem>
                <lightning:icon iconName="standard:scan_card" alternativeText="My Expenses"/>
            </lightning:layoutItem>
            <lightning:layoutItem padding="horizontal-small">
                <div class="page-section page-header">
                    <h1 class="slds-text-heading--label">Documill</h1>
                    <h2 class="slds-text-heading--medium">Documents</h2>
                </div>
            </lightning:layoutItem>
        </lightning:layout>
        <!-- / PAGE HEADER -->
        <!-- LIST DOCUMILL DOCS -->
        <lightning:layout>
            <lightning:layoutItem padding="around-small" size="6">
                <aura:iteration var="doc" items="{!v.listDocuments}" >
                    <p>{!doc.name}</p>
                </aura:iteration>
            </lightning:layoutItem>
        </lightning:layout>
        <!-- / LIST DOCUMILL DOCS  -->


</aura:component>

Here is the code of my VFPage : 
<!--
 - Created by stefaans on 29/04/2019.
 -->

<apex:page id="DocumillDocuments"  sidebar="false" showHeader="false" standardStylesheets="false">
    <apex:includeLightning />
    <div id="DocumillDocumentsDiv"></div>
    <script>

        $Lightning.use("c:DocumillApp", function() {
            $Lightning.createComponent("c:DocumillDocuments",
                    {},
                    "DocumillDocumentsDiv",
                    function(cmp) {
                        console.log('>>>>> App is hosted');
                    });
        });
    </script>
</apex:page>


As soon as the line hereunder is included within the component, I get this error.
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>


If I remove this line, the component shows correctly in the Visualforce page.

In my handler I don't have any real logic yet
/**
* Created by stefaans on 30/04/2019.
*/
({
doInit : function(component, event, helper) { // component, event, helper are parameter of doinit function
console.log('Init event is being triggered')
/* var action= component.get('c.getDocuments'); // Calling apex method
action.setCallback(this,function(response) // getting response back from apex method
{
var state=response.getState(); // getting the state
if(state==='SUCCESS')
{
component.set('v.listDocuments',response.getReturnValue()); // setting the value in attribute
}
});
$A.enqueueAction(action);*/

}
})

When I open the visualforce page, I get  the following error : 
aura_proddebug.js:43717 Uncaught (in promise) TypeError: Cannot set property 'innerHTML' of null
    at AuraInstance.message (aura_proddebug.js:43717)
    at AuraInstance.handleError (aura_proddebug.js:43632)
    at AuraInstance.$reportError$ (aura_proddebug.js:43693)
    at reportError (aura_proddebug.js:43429) 


 
I try to create a process, and get the above warning.
I retrieved the following article : https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_forcecom_flow_design_num_processes.htm


But the one that already exists only works when records are being created, while I now have the requirement for a process that also acts when record is being edited. I presume I'm obliged to create a new one then?? 
We have an external application that reads the eID. At the end it redirects to an URL we specify that also send the data in a parameter. We now use a visualforce page for this.

Is it also possible to do the same thing with a flow. So it redirects to a flow where the data of the external application are filled in the initial screen, and the user can continue to fill in additional data afterwards through other screens
I have a job to extract data from Salesforce to an SQL database.
In my logging I can see the following log, but I cannot see which Salesforce record is causing this.
2018-10-25 06:56:42,120 ERROR [Account_Extract] database.DatabaseWriter writeRowList (DatabaseWriter.java:211) - Database error encountered while writing row #12057 through row #12058 (execute batch update). Database configuration: Account_Extract.  Sql error: Argument data type decimal is invalid for argument 1 of substring function..
com.microsoft.sqlserver.jdbc.SQLServerException: Argument data type decimal is invalid for argument 1 of substring function.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(SQLServerPreparedStatement.java:306)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
    at com.salesforce.dataloader.dao.database.DatabaseWriter.writeRowList(DatabaseWriter.java:177)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.writeBatch(AbstractQueryVisitor.java:130)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.addResultRow(AbstractQueryVisitor.java:117)
    at com.salesforce.dataloader.action.visitor.PartnerQueryVisitor.writeExtraction(PartnerQueryVisitor.java:80)
    at com.salesforce.dataloader.action.visitor.AbstractQueryVisitor.visit(AbstractQueryVisitor.java:83)
    at com.salesforce.dataloader.action.AbstractExtractAction.visit(AbstractExtractAction.java:57)
    at com.salesforce.dataloader.action.AbstractAction.execute(AbstractAction.java:129)
    at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:121)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:149)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)


Does anyone have an idea how I can troubleshoot this kind of activity, so I know which record is causing this
I have a table where I add the following column :
{
    "label": "hasID",
    "fieldName": "IDStatus",
    "type": "text",
    "editable": false,
    "hideDefaultActions": true,
    "cellAttributes": {
      "iconName": {
        "fieldName": "IDStatus"
      }
    },
    "sortable": true,
    "initialWidth": 80
  },

But the problem is that it shows the icon but also the icon-value. How can I resolve this?
User-added image
 
Hi,

I have a visualforce page where you can type in a search term.

In Apex code I want to search for this term in my Salesforce-records on all fields, so also in a multipick-list field.

For example, I have a multi-picklist field with the following values :
- Value Test
- Value Other
- Valuet Test2

So when I search on 'Test' I should retrieve the records that have the first or the third value.

How can this be obtained in SOQL or SOSL, making use of a bind expression
I have an existing visualforce page, with a custom controller.
In the apex-code I'm using 
ApexPages.currentPage().getParameters().get('id')];

Now I'm calling this same VF page from the Utility-bar. Unfortunateley it doesn't have the context of the record-id.

How can I resolve the easiest way, so I can maintain most of the logic of the VF page?
Hi,

Im' using in lwc the following code : 
<lightning-record-form object-api-name={objectApiName} record-id={recordId} fields={fields} onsuccess= {handleSuccess} ></lightning-record-form>

After I went into edit, changed a value and saved the changes, I go back to the page where the record-form is in read-mode. But unfortunateley it doesn't contain the changed value. I need to refresh the whole page, to see the changes
In Lightning Flow I have a variable with a list of records that need to be updated, which I fill through a loop. When I wan't to do the update, I always get the error : 
12:24:26.351 (504433867)|FLOW_ELEMENT_ERROR|LIMIT_EXCEEDED: Cannot have more than 10 chunks in a single operation. Please rearrange the data to reduce chunking.|FlowRecordUpdate|UpdateRecord
12:24:26.351 (504638795)|FLOW_ELEMENT_END|613991d2bb2c20ff3bc830ae528716b21ff7f9a-2d89|FlowRecordUpdate|UpdateRecord

But the variable of the list is specified as a list of a specific Object-type

 
Here is the source-code of my component :
<!--
 - Created by stefaans on 29/04/2019.
 -->

<aura:component description="DocumillDocuments" implements="forceCommunity:availableForAllPageTypes" access="global" controller="DocumillHelper">
    <aura:attribute name="objectType" type="String"/>
    <aura:attribute name="listDocuments" type="Documill_Template__mdt[]"/>

   <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
        <!-- PAGE HEADER -->
        <lightning:layout class="slds-page-header slds-page-header--object-home">
            <lightning:layoutItem>
                <lightning:icon iconName="standard:scan_card" alternativeText="My Expenses"/>
            </lightning:layoutItem>
            <lightning:layoutItem padding="horizontal-small">
                <div class="page-section page-header">
                    <h1 class="slds-text-heading--label">Documill</h1>
                    <h2 class="slds-text-heading--medium">Documents</h2>
                </div>
            </lightning:layoutItem>
        </lightning:layout>
        <!-- / PAGE HEADER -->
        <!-- LIST DOCUMILL DOCS -->
        <lightning:layout>
            <lightning:layoutItem padding="around-small" size="6">
                <aura:iteration var="doc" items="{!v.listDocuments}" >
                    <p>{!doc.name}</p>
                </aura:iteration>
            </lightning:layoutItem>
        </lightning:layout>
        <!-- / LIST DOCUMILL DOCS  -->


</aura:component>

Here is the code of my VFPage : 
<!--
 - Created by stefaans on 29/04/2019.
 -->

<apex:page id="DocumillDocuments"  sidebar="false" showHeader="false" standardStylesheets="false">
    <apex:includeLightning />
    <div id="DocumillDocumentsDiv"></div>
    <script>

        $Lightning.use("c:DocumillApp", function() {
            $Lightning.createComponent("c:DocumillDocuments",
                    {},
                    "DocumillDocumentsDiv",
                    function(cmp) {
                        console.log('>>>>> App is hosted');
                    });
        });
    </script>
</apex:page>


As soon as the line hereunder is included within the component, I get this error.
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>


If I remove this line, the component shows correctly in the Visualforce page.

In my handler I don't have any real logic yet
/**
* Created by stefaans on 30/04/2019.
*/
({
doInit : function(component, event, helper) { // component, event, helper are parameter of doinit function
console.log('Init event is being triggered')
/* var action= component.get('c.getDocuments'); // Calling apex method
action.setCallback(this,function(response) // getting response back from apex method
{
var state=response.getState(); // getting the state
if(state==='SUCCESS')
{
component.set('v.listDocuments',response.getReturnValue()); // setting the value in attribute
}
});
$A.enqueueAction(action);*/

}
})

When I open the visualforce page, I get  the following error : 
aura_proddebug.js:43717 Uncaught (in promise) TypeError: Cannot set property 'innerHTML' of null
    at AuraInstance.message (aura_proddebug.js:43717)
    at AuraInstance.handleError (aura_proddebug.js:43632)
    at AuraInstance.$reportError$ (aura_proddebug.js:43693)
    at reportError (aura_proddebug.js:43429) 


 
I try to create a process, and get the above warning.
I retrieved the following article : https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_forcecom_flow_design_num_processes.htm


But the one that already exists only works when records are being created, while I now have the requirement for a process that also acts when record is being edited. I presume I'm obliged to create a new one then??