Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record merge throws an missing field error #1514

Open
maik-idealo opened this issue Jan 8, 2025 · 8 comments
Open

Record merge throws an missing field error #1514

maik-idealo opened this issue Jan 8, 2025 · 8 comments
Labels

Comments

@maik-idealo
Copy link

Describe the bug
We have updated to the latest version today. Now we get the following error when 2 cases are to be merged:

This error occurred when the flow tried to update records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: dlrs_CaseTrigger: execution of AfterUpdate caused by: System.SObjectException: Invalid field Incoming for Case (dlrs) Trigger.dlrs_CaseTrigger: line 7, column 1.

Our configuration is such that the parent is the case and the child is EmailMessage (see screenshot). The Incoming field is from EmailMessage. We configured "Relationship Criteria Fields"

To Reproduce
Steps to reproduce the behavior:

  1. Create 2 Cases
  2. Click on Merge, choose both cases and try to merge it.
  3. See error

Expected behavior
Merge records without errors

Screenshots
image

image

Additional context
It seems that on merge DLRS is looking for the configured "Relationship Criteria Fields" on the parent object.

@maik-idealo maik-idealo added the bug label Jan 8, 2025
@aheber
Copy link
Contributor

aheber commented Jan 8, 2025

@maik-idealo what version of DLRS are you running?

Can you reproduce this each time?

We have a few open issues that look a lot like this one. Working on them has stalled out because nobody reporting the issue has been able to replicate in a clean environment. We haven't figured out what the configuration is in a customers org that I could replicate in a scratch org to be able to work on this issue. If you can make sure you're on the most recent version and figure out how to make this happen in a fresh org (either developer edition or scratch org) then maybe we can finally track down this logic problem.

@maik-idealo
Copy link
Author

@aheber on the latest, 2.22

I have now tried to recreate it in a new dev org. Unfortunately also without success, the error does not occur there. I have already tried deleting the Apex Trigger and recreating it in our org, but that didn't help either.

@aheber
Copy link
Contributor

aheber commented Jan 8, 2025

If you're open to it and motivated I'd like your help to get to the bottom of this. It will take some time and patience because I don't have access to do it all myself. Salesforce is protective of their customers and as a volunteer on this project Salesforce doesn't allow me to use some of the normal package debugging tools.

Can you make it happen in a sandbox? I'd be more comfortable asking you to run experiments there than in a production environment.

I'd like to setup a time that we can do a screen share and you can show me what is happening, collecting a few debug logs along the way. I suspect this won't be enough as we don't be able to see what the managed package code is doing but it would be a good start.

If we can't find find enough information that way then I'll probably have to ask you to open a support case but I'll work with some people at Salesforce to get it to a team that can help us see what the managed code is doing during this time. That would be the really useful information.

I suspect there is a setting or series of configurations that I haven't found yet that cause this to happen.

My theory is somehow DLRS is getting confused about which object it should be running queries against and it is cross-contaminating configuration records. This is only a theory but I'm hopeful we can figure it out.

@maik-idealo
Copy link
Author

@aheber Of course, we can do that. Tomorrow I could make some appointments between 10am and 1pm CET. Otherwise probably on Friday. How would it work for you?

@aheber
Copy link
Contributor

aheber commented Jan 8, 2025

@maik-idealo tomorrow works great. Please use this to schedule a time:
https://calendar.app.google/tKfKPo8XVa4ZhUj58

@maik-idealo
Copy link
Author

@aheber unfortunately there are only slots for 5, 6 and 7pm

@aheber
Copy link
Contributor

aheber commented Jan 8, 2025

That makes sense, I read your timezone wrong. I thought I saw CDT instead of CET.

I'm in Mountain Standard Time (-7) right now so that time frame would be very difficult for me to connect. That doesn't give us a very large window to connect.

I think the earliest I could be available is 4PM CET, that is 8AM my time (if I'm doing the math correct). Do you have a date, Friday or next week, that schedule might work for you?

@maik-idealo
Copy link
Author

Hi @aheber how about next Wednesday 4pm CET?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants