A while back I posted a question, how do I create folders automatically when
an opportunity is created, then post an iframe in a tab that references that
recently created folder. Someone gave me an answer, to go ahead with this
process but I'm having trouble compiling the code, can someone help me out
with this?
This won't compile into a dll, what is wrong?
public string CreateDirectory(string root, string folderName) {
//create the directory root\foldername, using a suffix if necessary
}
"Michael Höhne" <michael.hoehne@nospam.nospam> wrote in message
news:<OOn0KJCyGHA.4392@TK2MSFTNGP04.phx.gbl>...
> Hi Luke,
>
> I doubt you can do it entirely with a script, but a workflow with a simple
> .NET assembly can do the job. The assembly contains a single function,
> CreateDirectory
>
> public string CreateDirectory(string root, string folderName) {
> //create the directory root\foldername, using a suffix if necessary
> }
>
> You must create the root directory, say "C:\opportunities\files" and share
> it, so your users will be able to access the content. Also specify full
> access rights for the network system account, to allow the worklow to
> create
> new folders.
>
> In the opportunity, create a new attribute "new_files". In the main form,
> add a new tab and a new section and in this section add the new_files
> field.
> Set it to disabled, as the user does not need to modify it. Below that
> place
> an iframe, called IFRAME_Files. Publish these changes.
>
> In CRM Workflow Manager, create a new workflow rule executing when a new
> opportunity is created. Call your assembly method and pass the following
> parameters:
>
> root = static value, the root folder where to create the directories. This
> is the root folder you created before, like like "C:\opportunities\files"
> folderName = dynmaic value, the topic of the opportunity
>
> Name the method call "Name of created folder".
> Add an update action to store a static value of \\crmserver\files\ in the
> opportunity.new_files field
> Add another update action to append the "Name of created folder" value to
> the opportunity.new_files field.
>
> \\crmserver\files\ is the name of the share your created before.
>
> Finally, in the onLoad event of the opportuity form, place the following
> script:
>
> if (crmForm.all.new_files.DataValue != null) {
> crmForm.all.IFRAME_Files.src = crmForm.all.new_files.DataValue;
> }
>
> Activate the workflow. If everything works well, the workflow process will
> create the folder for you and the iframe in the opportunity points to it.
> It
> does not show up immediately, because the workflow execution is delayed.
> But
> usually after a few seconds it should be available.
>
> --
> Michael
>
> http://www.stunnware.com/crm2
>
> ----------------------------------------------------------
>
> "Luke Davis" <luke@gorealco.com> schrieb im Newsbeitrag
> news:%23dYNOi8xGHA.1256@TK2MSFTNGP04.phx.gbl...
> >I want to write a script that autogenerates a folder that is named after
> >a
> >schema attribute. Then an iFrame on a separate tab links to the newly
> >created folder.
> >
> > For example, when a new Opportunity is created whether it be manually or
> > converted from a Lead, I want a "Files" tab to contain an iframe that
> > references a folder on the CRM server that is named after the Topic
> > schema
> > value.
> >
> > This might be a difficult task because it might present a circular
> > problem. But if anyone can help me out with this, that would be great.
> >
> > Luke Davis, MCSE: Security
> >
>
>
--
Luke Davis, MCSE: Security
DEM Networks - Senior Systems Architect
7225 N First, Suite 105
Fresno, CA 93720
Office: 1 (559) 439-1000
Fax: 1 (866) 640-2041
www.demnetworks.com