-
Notifications
You must be signed in to change notification settings - Fork 238
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
Validation Errors 'ENTITY_IS_DELETED' While Saving when Parent gets Deleted As Well #39
Comments
Sorry for the slow response on this one, I'm at the MVP Summit this week, will try to get to this between flights this weekend or later next week. Thank you for your patience. |
In the meantime have you tried configuring without using the Pilot UI, through the standard Salesforce Detail page? |
Oddly enough I also can't reproduce this in sandbox yet. It is only in production. I am still trying to pin down why... |
Do you have any triggers on these objects in production that are not in sandbox? |
Happy to take a look through subscriber support login if you want to grant access, please give me the steps to reproduce and i'll see what i can see that might causing this! 👍 |
Or maybe there is a way for me to install the non-profit starter pack in a test org of my own? As you say it may well be a conflict and ordering issue between the triggers on these objects. Would love to replciate the use case and add to the packages test suite. |
Excellent I've reproduced this by installing the packages and setting up a rollup as above! I'll get started debugging it! |
I think the reason why might be down to the order triggers execute, salesforce documents this as non-deterministic, so that might be the reason it works in sandbox (just seen it working as well in there). |
Great news! I am glad you can reproduce it. I agree with you...I think it is caused by the fact that we can not force certain triggers to run before others (just like workflow!). So you are seeing it work in sandbox and fail in production as well? |
Strike that, it is also giving me issues in production. So it's not sandbox/production related. I'm also using NPSP. |
Hi this is an old and complex issue, not sure i ever did get round to debugging it looking at the trial, just in case though can you confirm your on the latest version of the tool? |
I'm using version 1.10. Thanks! This particular instance of this issue for us may become mute soon, because we are about to upgrade to NPSP 3.0 and will be able to use a native roll-up summary field instead of the lookup tool. However, given that NPSP is managed and I can't see or modify any of the triggers, I'm guessing this issue will arise again with a different lookup. |
Ok, let me know, as your on quite an old version of the tool, it would be good to upgrade before retrying. |
Oye, yes. I didn't realize how behind I had gotten! I will do that and repost if I'm still having the issue! |
Here I am again. Now running 1.23 and still having the issue. :-( |
Ok. I'm heading out to DF next week, but have marked this issue as a priority for the next major chunk of time i get to look at this. I note that i did reproduce it earlier in this discussion. There does however seem to be a theme around the NPSP, i do wonder if we need to pool resources and setup a shared org to demo setup and/or reproduce issues in, just a thought. |
@JodiNA would you be able to help this issue and others around NPSP by setting up a free Developer Edition org with a repo of this issue? |
Hi Andy, happy to help. I set up a dev. org. so that it can be reproduced, but I'm getting stuck with installing NPSP. I'm not sure how to install it into a dev. org... Suggestions? I can easily replicate with NPSP 2, but not sure about NPSP 3 (I'm guessing the problem still comes up when triggers are involved, but I had a conflict yet). |
You should be able to install it into a dev org just like in production or sandbox? What issue are you having? |
Lets try with an org with NPSP 2 in it first, we can always upgrade in due course or create another org for NPSP 3. |
When I give my dev. org credentials when trying to install, it's giving me an error that I entered invalid credentials. I selected "install in sandbox" - perhaps that's not correct? |
Update - haven't had a chance to look into this further this week. Will try again early next week! (Dec. 14) |
Great to hear this is fixed, @afawcett! Or at least the part that was breaking from the rollup I set up! I am going to go back and check about the original error I had, with NPSP 2. I'm curious if it was the same self-referencing issue and I didn't realize it. The reason I did a rollup calculation on the same record (what you said, self-referencing) is that I wanted to create a Rollup Summary field on Accounts. It's not possible to use formula fields in Rollup Summaries, so this was how I did it. So, essentially, my options were to do one formula field on opportunities and then potentially a bunch of Lookup Summaries based off of that field, or one self-referencing Lookup Summary and then I can take advantage of the native SF functionality and do multiple rollup summaries off of that. I chose the latter. Does that make sense? Another alternative would have been to do a workflow rule on the opportunity to update the field, but that doesn't quite work either because there isn't a good way to trigger revaluation of the records the way I can do with DLRS. Hope that helps as an explanation! |
I'm going to try to set up the the rollup I was getting with Households in the developer org for repro and testing. |
Hi again! @afawcett I set up another rollup in the dev. org which mimics one of the issues I was having. The rollup is called "Household Member IDs." The rollups concatenates the IDs of all contacts in a Household. The error occurs when you try to delete a contact. The caveat is that the contact must have a Household. Because the account model is Households, a household will not be generated automatically. To reproduce the error, I went and manually created a Household for Test Contact. The error is the following: Validation Errors While Saving Record(s) |
Hi again. I was able to recreate the last weird NPSP error I was getting in one of my sandboxes that is still on NPSP 2 and using the One-to-One account model. I tried to recreate in the dev org, but I wasn't able to get the problem to occur. So, maybe it's a non-issue, but I figured I should document it anyhow. But, these are the steps and problem:
To test in the dev. org, I change the Account Model to "One-to-One." Then I selected under the Household setting Household Object Rules "All Individual Contacts." These two settings ensure that a ghost account is created for each contact, and the field in the rollup will be populated. Here is a screencast of the error happening in my sandbox. View of the rollup is attached. |
Ok i've been trying to recreate your Contact delete issue first, can you reset the org and confirm the steps to reproduce this error and we can start with this one. Regarding your explanation on the self referencing rollup, it's probably me, but i'm not really getting it as yet. But lets focus on the Contact issue for the mo... 👍 |
I have setup this a tag to group NPSP related issues. So we can see if we can team up on what i think is a general issue. My personal challenge is i don't have any knowledge of NPSP. @JodiNA over in issue #39 has kindly worked with to setup a reproduction org with DLRS and NPSP installed within. This has already led to one issue being resolved in v2.3 lets see if we can close in on more. I'm happy to create users in this org so we can work to reproduce the issues in that org and i can debug more easily, just message me via SF Community or DM via Twitter your email and i'll setup a user. |
To reproduce the contact delete issue:
Let me know if that doesn't work! I've left the NPSP account model to the newly recommended setting, which is why the household is not generated automatically. If needed, I can change the settings. But I thought it would be more useful to be using the model that more orgs are likely to be using. |
Thanks! 👍 |
Ok great, reproduced it! Now to dig in... 👍 |
Sweet! On Friday, March 25, 2016, Andrew Fawcett <[email protected]
Jodi Nemser-Abrahams Web: www.keshetonline.org Subscribe for LGBT Jewish news, resources and inspiration in your inbox Registration http://www.keshetonline.org/teenshabbaton/ for our first Stand up for transgender rights. Sign Keshet's petition A teen. A mom. A straight rabbi and a queer rabbi. |
These NPSP related issues have been open a while. Prior to an MVP event in Chicago this year, i did put out a shout out to get together with an NPSP dev to debug this further (my prior attempts failed since i cannot see the NPSP and lack the knowledge to set it up unmanaged). I did get some response from my Chatter post. The general view though was that these are NPSP v2 issues and that the use of NPSP v3 is recommended. So my questions are... do those on this issue agree re: NPSP v2? And if so should we try to reproduce these on NPSP v3 or is the issue even known to exist on NPSP v3? |
Andrew, I do believe this is an issue with NPSP V3, so I can help you with this. It seems you need an unmanaged package installation of the NPSP V3 in an Org. Let me know see if I can create one and add you as an Admin to that. Would that help? I can likely help debug as well, if that would be helpful. Let's chat, I want to help with this one. |
Oh yes please, that will be great. Yes lets get a dev org up and running, deploy both unmanaged into it and attempt to reproduce. Happy to do a screenshare or whatever to collaborate. So yes please, if you create an org, deploy NPSP into it, create me an admin user and i'll push DLRS unmanaged into it, then pass it back to you to repo, hows that sound? |
I'm happy to do that Andrew. I'll work to get the dev org set up and you added. Should I use [removed] as your email or another email address? I'll let you push the DLRS into the instance and then I'll play and create the issue, okay? You're the best! |
Yep that email is fine. |
Hi Andrew, I'm having this issue too unfortunately, and I'm on v3.85 of the NPSP, and 2.4.2 of the DLRS tool. The error I'm getting is when there is only one contact connected an NPSP household, and we attempt to change the account that the contact is connected to. It seems the NPSP is attempting to delete the old household at the same time that the DLRS is attempting to update it. We have a process workaround thankfully, so it's not urgent, but I thought it would be worth reporting. Let me know if you need any more info from me. Thanks Andrew. Wyan |
I should say that we do have a process workaround, but it's actually very tricky to fix issues. We have to either delete the contact and recreate, or create a dummy additional contact record in the household that then gets deleted when we manually delete the superfluous household record. Would be great to have a solution! |
Thanks @wyan-carter always great to get more insights like this, appreciate this. |
Thanks to everyone on this issue an others, i have now just applied a fix to v2.7 to address this issue. Basically making the tool tolerant of errors occurring when the parent record has been deleted by child trigger logic. As triggers fire in non-deterministic times, this bug has also been quite hard to pin down, as well as needing NPSP installed and configured in a way i can debug. Thank you all for your help! Fixed in v2.7! |
Brilliant, thanks Andrew! Really appreciate your hardwork on making this tool better, we rely on it for so much. Thanks again. |
Getting below Error While converting the lead and selecting the Account Type "HouseHold" how can we change the default record type, as it always considering Household only but i need to map another one "Organization Record type" once i will convert the lead and selected the account type "Organization". |
The non-profit starter pack relates Contacts(child) to Households(parent and custom object). When a single Contact is related to a single Household and one tries to delete the child contact the attached error is displayed.
I believe what is occurring is the Declarative Roll Up code is trying to update the parent with a roll up number while the non-profit starter code is trying to delete it and a conflict occurs. Accounting for this issue may be an enhancement to this package but I thought I would offer this scenario. How can we properly account for ignoring the roll up count if the parent is being deleted programmatically when the child is deleted?
I am happy to provide login access to review this scenario if needs be. I seem to only be able to reproduce this in production at the moment.
The text was updated successfully, but these errors were encountered: