I have a view with Document A selectedI create a new document; we’ll call it B, and start editing it.
There is a button on document B that creates a new document, Call it C.
If I hit the button before saving B, C currently inherits A’s information.
The button code is pretty simple.
@Command([Compose];“”;“Property Card”)
What can I add to the code to either, make document B the selected document…
Or
What function could I use to save document B
Something like:
@SaveCurrentDoc;
@Command([Compose];“”;“Property Card”)
Thanks in advance
Jim Lamb
Subject: inheriting wrong document information
“@SaveCurrentDoc” is usually spelled “@Command([FileSave])”, but other than that you’re doing alright. To avoid problems, though, do it this way:
@If(@Command([FileSave]); @Command([Compose];“”;“Property Card”); @Prompt([OK];“Save Error”;“A Property Card cannot be created until this document has been saved successfully.”))
Subject: RE: inheriting wrong document information
Thanks again Stan
Just for fun, is there a way to give the current document focus?
That would alieviate the need to save it.
Jim
Subject: RE: inheriting wrong document information
Trust me, you WANT to save it. (There’s nothing much more annoying than crosslinked documents that don’t actually exist.) If you are using an action on the form for the “current document”, then the document will have focus by default (barring the embedded view thing discussed earlier), but if that document does not yet exist in the database, the inheritance context may not be what you expect.
Subject: RE: inheriting wrong document information
I solved this one but making an action button on the parent page that is hidden till the document is saved.