ljm Posted December 17, 2008 Posted December 17, 2008 I have two tables: - email addresses - notes. I have set up a layout with notes as a portal, and using a status on the email address I'd like to be able to add a note to the portal that is address is invalid and it's being removed from the record. Every way I try to script this I can't get a note record written in the portal if the portal does not already have a note in it. I have checked to see if you allow creation of record is checked off (though on the relationship table these two tables are not directly related) Any thoughts about what step I am most likely missing? I've tried both go to portal row first and next, and then replace the field "Note" with a calculation. I get an error message: "This operation cannot be performed because one or more required related records are not available and cannot be created." I know conceptually the problem is that there is no Note record to write to, but can't figure out how to add a new record in the portal. When I use the script step of new record it adds a parent record. Thanks in advance for your help.
comment Posted December 17, 2008 Posted December 17, 2008 on the relationship table these two tables are not directly related You need to explain how these tables are related, then. In general, it's much more convenient to have a script operate in the related table itself, instead of fiddling with portal rows.
ljm Posted December 17, 2008 Author Posted December 17, 2008 The relationship is through two other tables. The relationship table it is so packed because I use about 15 tables for various kinds of info. There is a central table called People. (The hub) People is related directly to Notes (spoke) People is related directly to Emails (spoke) Bad Emails (spoke once removed) is related directly to Emails Bad Emails<->Emails<->People<->Notes I am working in bad emails and writing something to Notes. I can swap the whole layout do something directly in Notes add a new record based on an id from Bad Emails and write what I need, but I thought there might be a simple way to do this with the portal. Thanks.
comment Posted December 17, 2008 Posted December 17, 2008 You cannot create a new record in a portal to Notes on a layout of Bad Emails, unless the current record in Bad Emails already has a related record in People (through Emails). can swap the whole layout do something directly in Notes add a new record based on an id from Bad Emails and write what I need That's what I would do. Portals are for users, not for developers. Note, however, that your real issue will still be there. If you don't have a related Person for the current record in Bad Emails, then how will the script know to whom should the new record in Notes be related to?
ljm Posted December 17, 2008 Author Posted December 17, 2008 You are right. Bad emails could relate directly to People, but it doesn't relate to Notes (not yet). This is the one thing I do with enough regularity that I need to get a good technique that I consistently re-use. Thanks again.
comment Posted December 17, 2008 Posted December 17, 2008 No, no, no... The message you are getting indicates that Bad Emails does NOT relate to People. There is either no Email record in between, or the Email record doesn't have a related Person. That's exactly what it says.
ljm Posted December 17, 2008 Author Posted December 17, 2008 You are right. The relationship between BadEmails and Email was not working, because the email record had been deleted and moved to BadEmails. Once I moved the relationship directly to people it worked just fine. Thank you for pointing that out.
Recommended Posts
This topic is 5876 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now