function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pjaenick.ax736pjaenick.ax736 

pass new object var to another method

Is there a way to combine these two statements?  If there is, I haven't been able to get the syntax right :

            Case newCase = new case();
            insertCaseAndAttachEmail(newCase, email);

Thanks for any assistance !
Pete
 
Best Answer chosen by pjaenick.ax736
Neetu_BansalNeetu_Bansal
Hi Pete,

You can use like this:
insertCaseAndAttachEmail(new Case(), email);
Let me know, if you need any other help.

Thanks,
Neetu

All Answers

Neetu_BansalNeetu_Bansal
Hi Pete,

You can use like this:
insertCaseAndAttachEmail(new Case(), email);
Let me know, if you need any other help.

Thanks,
Neetu
This was selected as the best answer
pjaenick.ax736pjaenick.ax736
ha !  thanks!  Just need to discard my variable name - why didn't I try that? :)  Thanks Neetu !  Exactly what was needed.