• Mars Rover 1489
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I need to override standard Create and Edit Actions on Account object with Lightning Component. Is there a way or a type of field that we could cover the following requirement? Have a field with some predifined values but letting user if he wants to enter free text. I would actually like something like Subject field on Task object but i cannot find any way to implement it. Any ideas please ?
Example: I have a picklist field for Citizenship that has some values for Countries (England, Germany, France, ...etc...). But i want to let user enter his own value (for example: German). i have tried using the following but without success:
 
<!--05/09/2019 George Galaios: Code for Iteration Picklist: Citizenship -->
                        <lightning:select aura:id="accCitizenship" label="{!$Label.c.ea_citizenship}" value="{!v.accountRecord.ea_Citizenship__c}" disabled="{!and(v.noExtraPermission, v.noPermAndCleansed)}" class="slds-size--1-of-2 slds-p-horizontal_x-small">
                            <aura:iteration items="{!v.ea_Citizenship_Values}" var="item">
                                <option value="{!item}" selected="{!item==v.accountRecord.ea_Citizenship__c}">{!item}</option>
                            </aura:iteration>
                        </lightning:select>                
                        <!-- End of Code for Iteration -->

 
Hi all,

i have the following case related to Merge Operation:
We use Duplicate Record Set Object and Duplicate Record Items in order to manage duplicate records for Accounts. We have a custom process where if some accounts seem to be similar, a new Duplicate Record Set is created via Apex with Duplicate Record Items the suspect Accounts. Now the case is that i need when those accounts are merged to update a custom field (Status to be updated from pending to Completed) on Duplicate Record Set Object.

I tried the following:
1) Process on Duplicate Record Item but i could not cover the case of Merge event
2) Trigger on Account object but i cannot find the Id of Duplicate Record Set in order to update its status.
3) Trigger on DuplicateRecordItem where i did the following:
trigger ea_UpdateDRSAndTask2 on DuplicateRecordItem (before delete) {
    for (DuplicateRecordItem dri : Trigger.Old) {
        Account mergedAccount = [select id, name, MasterRecordId from Account where id=: dri.RecordId];
        
        if (mergedAccount.MasterRecordId != null) {
            DuplicateRecordSet drs = [select id,ea_Status__c from DuplicateRecordSet where id =:dri.DuplicateRecordSetId];
            drs.ea_Status__c = 'Complete';
            update drs;
        }
    }
}
but i was getting SOQL Error (List has no rows for assignment) on line three. I guess first Accounts are merged and then it deleted the Duplicate Record Item so it does not have a RecordId.

Do you have any suggestions? I really feel stuck with this case.
Thanks in advance!
I need to override standard Create and Edit Actions on Account object with Lightning Component. Is there a way or a type of field that we could cover the following requirement? Have a field with some predifined values but letting user if he wants to enter free text. I would actually like something like Subject field on Task object but i cannot find any way to implement it. Any ideas please ?
Example: I have a picklist field for Citizenship that has some values for Countries (England, Germany, France, ...etc...). But i want to let user enter his own value (for example: German). i have tried using the following but without success:
 
<!--05/09/2019 George Galaios: Code for Iteration Picklist: Citizenship -->
                        <lightning:select aura:id="accCitizenship" label="{!$Label.c.ea_citizenship}" value="{!v.accountRecord.ea_Citizenship__c}" disabled="{!and(v.noExtraPermission, v.noPermAndCleansed)}" class="slds-size--1-of-2 slds-p-horizontal_x-small">
                            <aura:iteration items="{!v.ea_Citizenship_Values}" var="item">
                                <option value="{!item}" selected="{!item==v.accountRecord.ea_Citizenship__c}">{!item}</option>
                            </aura:iteration>
                        </lightning:select>                
                        <!-- End of Code for Iteration -->

 
Hi all,

i have the following case related to Merge Operation:
We use Duplicate Record Set Object and Duplicate Record Items in order to manage duplicate records for Accounts. We have a custom process where if some accounts seem to be similar, a new Duplicate Record Set is created via Apex with Duplicate Record Items the suspect Accounts. Now the case is that i need when those accounts are merged to update a custom field (Status to be updated from pending to Completed) on Duplicate Record Set Object.

I tried the following:
1) Process on Duplicate Record Item but i could not cover the case of Merge event
2) Trigger on Account object but i cannot find the Id of Duplicate Record Set in order to update its status.
3) Trigger on DuplicateRecordItem where i did the following:
trigger ea_UpdateDRSAndTask2 on DuplicateRecordItem (before delete) {
    for (DuplicateRecordItem dri : Trigger.Old) {
        Account mergedAccount = [select id, name, MasterRecordId from Account where id=: dri.RecordId];
        
        if (mergedAccount.MasterRecordId != null) {
            DuplicateRecordSet drs = [select id,ea_Status__c from DuplicateRecordSet where id =:dri.DuplicateRecordSetId];
            drs.ea_Status__c = 'Complete';
            update drs;
        }
    }
}
but i was getting SOQL Error (List has no rows for assignment) on line three. I guess first Accounts are merged and then it deleted the Duplicate Record Item so it does not have a RecordId.

Do you have any suggestions? I really feel stuck with this case.
Thanks in advance!