I have a request to put a button on Case Entry that will copy pieces of that case and create a new case with those items.
Has anyone done anything like this? Is it possible?
I have a request to put a button on Case Entry that will copy pieces of that case and create a new case with those items.
Has anyone done anything like this? Is it possible?
Possible for sure.
Trace that BO when you create a new case. Take that logic and put it in a function. Then invoke the function via a button added with a new layer in Application Studio (pass the Case number of the case you want to copy).
Function should look something like
GetByID for the case to copy
GetNew for the new case to add
Fill in fields in the new case
Update to save the new case
Return the new case number to so the app can pull in the new case created.
Michael,
Tammy delegated this effort to me. Thanks, Tammy!
Your description is exactly what I needed to know to get this started. I followed all the steps, and I just have the final piece that is missing. Here’s what I did:
I wrote the function with all of your steps and verified it works. [One note is that I had to set the RowMod value to “A” for “Adding” a new row.]
I added the button to the screen, and added the “onclick” action to call the function. It does call the function, and the record gets created as desired.
These 3 blog posts were immensely helpful along the way:
My “missing piece” now, is, in Application Studio, how do I get the returned value (newCaseNum) from the function that was called, and then, ideally, launch a new Case Entry Detail Edit window with the new Case?
FWIW, I’m new to Application Studio, so it may be abundantly obvious to everyone else but me.
And thank you again for the guidance!
Greg
BTW, @mbilodeau’s blog is quite good! It filled the void left when GingerHelp.com moved on to harmoni.io.