You need to sign in to do that
Don't have an account?
fiona gentry
lightning Error Case: id value of incorrect type: at Edit Case Type
Hi Gurus,
I am trying to edit an existing ERT case type which is a child to Case object by overriding standard EDIT buttin in ERT case record ,here is error
I am using use Philippe Ozil's ready component (https://github.com/pozil/sfdc-ui-lookup) for the lookup/autocomplete thing. copied save LookupSearchResult class, the whole aura component and 2 aura events in my org ..here is controller apex
Here is cmp
Any resolution why I am getting this Case: id value of incorrect type: a3k2F0000007GUpQAMerror ""
Regards,
Fiona
I am trying to edit an existing ERT case type which is a child to Case object by overriding standard EDIT buttin in ERT case record ,here is error
I am using use Philippe Ozil's ready component (https://github.com/pozil/sfdc-ui-lookup) for the lookup/autocomplete thing. copied save LookupSearchResult class, the whole aura component and 2 aura events in my org ..here is controller apex
public with sharing class ERT_MultiLevelSelectEdit { @AuraEnabled(cacheable=true) public static List<LookupSearchResult> search(String searchTerm, List<String> selectedIds){ if(String.isBlank(searchTerm) || searchTerm.length() < 2){ return null; } String t = '%' + searchTerm + '%'; List<Case_Type_Data__c> records = [FIND :('*' + searchTerm + '*') IN ALL FIELDS RETURNING Case_Type_Data__c(Id, Name, Level_1__c, Level_2__c, Level_3__c)][0]; List<LookupSearchResult> results = new List<LookupSearchResult>(); for(Case_Type_Data__c ctd : records){ results.add(new LookupSearchResult(ctd.Id, 'Case_Type_Data__c', 'standard:case_wrap_up', ctd.Name, String.join(new List<String>{ctd.Level_1__c , ctd.Level_2__c, ctd.Level_3__c}, '; ') )); } return results; } }
Here is cmp
<aura:component implements="force:hasRecordId,force:appHostable,flexipage:availableForAllPageTypes,force:lightningQuickAction,lightning:actionOverride" access="global" controller="ERT_MultiLevelSelectEdit"> <aura:attribute access="public" type="List" name="selection" default="[]"/> <aura:attribute access="public" type="List" name="errors" default="[]"/> <lightning:card title="Edit Case Type"> <lightning:recordEditForm aura:id="myForm" objectApiName="ERT_Case_Type__c" onsubmit="{!c.onSubmit}" onsuccess="{!c.onSuccess}"> <lightning:messages /> <c:Lookup selection="{!v.selection}" onSearch="{!c.lookupSearch}" onSelection="{!c.useSelected}" errors="{!v.errors}" label="Search" placeholder="Search Case Types Data"/> <lightning:inputField aura:id="Level_1__c" fieldName="Level_1__c" /> <lightning:inputField aura:id="Level_2__c" fieldName="Level_2__c" /> <lightning:inputField aura:id="Level_3__c" fieldName="Level_3__c" /> <lightning:button class="slds-m-top_small" variant="brand" type="submit" name="save" label="Save" /> </lightning:recordEditForm> </lightning:card> </aura:component>
Any resolution why I am getting this Case: id value of incorrect type: a3k2F0000007GUpQAMerror ""
Regards,
Fiona
Greetings!
This error occurs,if you have defined the list of type as one and the returned value is of type some other.I would suggest you to check the list which is being returned from the SOSL query.
Reference:https://salesforce.stackexchange.com/questions/62974/error-compile-error-invalid-bind-expression-type-of-sobjectaccountshare-does
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri