How to add a resource to project using workflow in NetSuite - netsuite

As the title says...
I've successfully got workflows working that create project tasks, so I have some idea how the workflow customization tools work. But I'm struggling to see how I can (or even if I can) use a workflow to auto-magically add resources to the project (and then assign them to the project tasks I dynamically create.
Regarding which users/employees to add as resources, I imagine sorting out an appropriate clause shouldn't be too hard.

If I recall correctly, Resouces on a Project record are sublists. If I am correct, then it is not possible via workflows. There is a limitation with Workflows that they cannot work on record sublists.
You will have to do this via SuiteScript.

Related

Automating Approval Processes in Dynamics CRM

A bit of background before I begin.
Background:
I am working on migrating an existing .NET based system to Dynamics CRM and one of its key feature is its 'Request Approval Process'. I have implemented some simpler versions of such approval processes in past but this one is a bit complex since it involves multi-level approvals, multiple approvers at one level, amendment logic, delegation functionality, etc.
Analysis Till Now:
Before pushing this question at SO, I did a fair analysis of the requirements from my end and have come up with few possible approaches:
Workflow based approach (something on lines of this)
Complete custom logic using Plugins/Web Resources (something on lines of this)
I am not explaining the details of these approaches as of now but the core issue is that none of these two approaches are fitting correctly to my requirements.
Queries:
While analyzing these approaches I came across some newer functionalities added to CRM (listed below) but did not get any additional resources to explore them further. I just want to confirm that I am not trying to achieve something which is already present out-of-the-box or going in the incorrect direction.
1. Internal Process Automation:
Reference: Here
Any leads/thoughts on this approach? I am not able to find any good documentation/articles around this.
2. Graphical Approval Workflow:
Reference: Here
This feature seems to be useful but it is mentioned to be a part of Dynamics Marketing. With the new structuring of Dynamics 365, will this feature be a part of Dynamics CRM by default?
Also, the Prerequisites section of this link mentions certain Item Types for which you can configure this functionality. So can't we use this functionality for any entity records?
Any kind of help/inputs would be appreciated.
I'd suggest the best of both worlds: using out-of-box Workflows along with custom Workflow activities that you can write with C#. Use as much out-of-box functionality as you can, but when you need to query records or run custom logic, create a custom workflow activity that can be used in your out-of-box Workflow. Custom workflow activities are similar to plugins in that they are written using C#. You can have custom inputs and custom outputs for your activity.
For example, maybe your approval process needs to look up the appropriate approving user for this record. You could write a custom workflow activity that takes an input (the record being approved) and an output (the user that has the ability to approve). Then in your Workflow, you'd add your custom activity as a step. After that step, you could send an email to the approver by using the output of that custom step.
More information about custom workflow activities: https://msdn.microsoft.com/en-us/library/gg309745.aspx

One time javascript function run in custom action

I have a request from the customer that they want every time they create a subsite (publishing site) .We have to add a custom column to OOTB Documents list.
I have done some researching the way to add the custom column to
Documents list in onet.xml but have no luck .
Then i think about the work around solution that i create a
ScriptBlock custom action that will call javascript function which
will add the custom column to document list , then i will put this
custom action to a feature ,and finally i will reference that feature
in onet.xml.
It run well but the javascript function call every time i refresh the page. I just want it run one time when i active the feature.
Does anyone have any suggestion ? I use sandbox solution and Sharepoint Online .Sorry for my bad English
I don't think a custom action is the right way to do this, Custom actions generally need some sort of user interaction.
Get CKS dev tools in Visual studio
Create a new SharePoint solution
Add a new web template(CKS Dev) to your solution from the Add new item menu in VS
Create an additional feature (web) with a list template (Your documents Library and add your column)
Update the Web templates onet file
Also sometimes it's better to put up what your having issues with as you have said you have had no luck with the above, What is the issue you are having, Post some code up etc rather than going down the route of changing the way you implement the solution
Many Thanks
Truez

How to edit Workflow steps via API?

In my solution I have a workflow where one step contains a reference to Queue. After importing this solution on another CRM instance this workflow could not be activated because it contains an invalid reference - Queue can not be resolved. Queue with same name is created on new CRM but resolving is probably based on record Guid.
Now, I'm wondering, is there a way to edit workflow steps using CRM SDK? Whole process of CRM solution deployment is automated. And I want to remove all manual work. Some example would be great :)
Thanx in advance!
There are 2 things you can do if you are having issues with the Guids not matching in a workflow lookup when deploying from one environment to another.
Use the API to create those records referenced in the WF. When you create a record you can actually specify the Guid that it uses as the id. So write a tool or see if one exists already that will create some default data for your environment.
Use a configuration entity with references to all the EntityRefrences needed in your WFs. Then you can create a custom workflow activity to retrieve the configuration entity record (there should only ever really be one) that contains all the references in that environment.

Sharepoint Desinger 2010 - Transfer Reusable Workflow from Stage to Prod

I need to transfer a reusable Workflow from the stage env. to the prod.
The workflow is associate to a list, so the list id is stored in the workflow.
Is it possible to transfer the workflow and change the list id to the list name with Visual Studio? (We have no SharePoint Designer access to the prod. env.)
Short answer: No
I tried several hours to fix a reusable workflow, which same as yours was associated with a specific list - I switched systems and the GUID changed --> Workflow was broken.
You can give it a try and rename the MyWorkflow.wsp to MyWorkflow.cab and extract that somewhere. The workflow files are XML based hence you can edit the associated list GUID with your favorite editor. Now you need to package your edited file back into a cab file, rename it to wsp and you can give it a shot. I tried exactly that and resented to just "re-clicking" (as it's SPD) my workflow (two screens come in handy here).
That's what I call "reusable" workflow... Next time do not associate your reusable workflow with anything to keep it reusable.
I would recommend creating an Content Type in a Feature and then base your list and your Reusable Workflow association on that Content Type. We had a project in December where we successfully used this method. I saved a Reusable Workflow as a template. I then deployed the Content Type solution package and the Workflow solution package to another environment. Worked like a charm.
There are tow alternatives for deploying workflow regardless the assigned content types
It is very simple just do the following:
Alternative One
Save the workflow as template
Go to the following path in your site
http://your_server_Address/SiteAssets/Forms/AllItems.aspx
Download the file as WSP
Go to the following URL
http://your_Target_server_Address/_catalogs/solutions/Forms/AllItems.aspx
Upload the WSP, and activate the solution
Go to the site settings, then Site Actions, then Manage site features
Activate the feature that is related to the workflow
If you click workflows under site administration you would be able to see your custom reusable workflow
Alternative Two
Save the workflow as template
Go to the following path in your site
http://your_server_Address/SiteAssets/Forms/AllItems.aspx
Download the file as WSP
Open your visual studio
Click add new project
Under SharePoint choose 2010
Choose Import reusable work flow
Follow the wizard
Project will be created and can be deployed
Note : Make sure your workflow is reusable and that it has no errors

How do I build custom workflows in SharePoint?

I need to learn how to build custom workflows in SharePoint. In addition to basic stuff like having legal sign-off on documents, I need to be able to execute arbitrary custom code at certain points. For example, after legal signs off it should export the document and update a database table indicating that a new version is ready.
Is this possible using SharePoint? If so, where can I find the documentation or tutorials I would need to get started?
Getting Started Link 1,Getting Started Link 2 links will help you to get started with the SharePoint Custom Workflows. And also it is possible to do any arbitrary code inside the workflow. Also there is another type of work flow called State machine for which there is a class one article
Workflow as the whole is built using sub parts called Activities which dictates what the workflow should do at a particular point of time, I remember you have an activity called Code Activity which will help you to achieve what you want.
Robert Shelton's Workflow Video Tutorial series is very helpful:
http://rshelton.com/Tags/Workflow/default.aspx

Resources