How to access Nintex managed holidays in SharePoint 2010 - sharepoint-2010

We are building a pretty straight forward business project that uses SharePoint 2010 and Nintex workflows. Just the usual lists with workflows attached doing stuff to the list items.
Nintex workflows can do pauses for X number of days that exclude holidays if the holiday dates are entered through the Nintex "Manage Holidays" action in the settings for a web. It just lets you enter a bunch of Name + Date combinations. That's great and lets the workflows do their job nicely.
Now, we'd like to be able to do custom calculations in a web service that a Nintex workflow can call, that also take those holidays into account. The calculations are just too complex to do with the features that Nintex gives you - which is fine.
My question is; is there some way to query that list of dates that we have entered for Nintex to use? They're not stored in any SharePoint lists, hidden or otherwise; they go straight into the Nintex database. I have looked at the Nintex workflow webservice - all the functions seem to be specific to starting/stopping workflows etc.
I'd also rather avoid accessing the Nintex database directly, or duplicate those dates in a SharePoint list.
Is there any way to get at that data? Either through .NET code (using the nintex dlls) or other webservices?
Cheers :D
Cheers

There are public property and method to get holidays in Nintex.Workflow.dll:
public class HolidayCollection : List<Holiday>
{
// all holidays
public static HolidayCollection Holidays { get; }
// holidays specific to current web
public HolidayCollection GetHolidays(Guid webId, Guid siteId);
}
Declaring Type: Nintex.Workflow.Scheduling.HolidayCollection
Assembly: Nintex.Workflow, Version=1.0.0.0
Hope this helps.

Related

Business Dynamics 365 API - Not able to get Web/ecommerce enabled items only

Using Dynamics 365 APIs, able to get all the items created on Microsoft - Business Control. But there is an option to make the item visible on the Web/commerce. Through API not able to get a parameter that specifies whether the web is on the Web or not. As a result, returning all the items created but the Client requirement is to display the items that are web/commerce-enabled.
https://ansit-tarannum.tinytake.com/msc/NzU4NjA2MF8yMDU0OTM1OA
It will be highly helpful if anyone can help with this.
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_item_get
I went through all the APIs but didn't find any parameter that indicates the Web-published items.
I am expecting to get that specific parameter that distinguish between published and not published items on Web/commerce.
Or any API that has this data along with mapping with item id.
Thanks
Tarannum

how integrate outlook calendar with bizagi?

In an activity in bizagi, I also need to send an email (resolved), I need to schedule an appointment in the "outlook" calendar. I cannot find how to make this integration, if possible.
my advice is to put such code outside expressions as it can get messy after some time. I would go for C# DLL containing Exchange Web Services (EWS) client, that would create appointment as described here: https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/calendars-and-ews-in-exchange.

How to sum scheduled work hours for a user?

I wonder if it's possible to sum up a user's scheduled work hours?
I have customized the user entity and added a field that I want to show the user's total defined work hours in for the current week. But I don't know how to access the entity containing work hours. The problem is that I'm in an online organization and I can't access the database.
I've tried downloading SDK and of course googling. Since I'm a beginner I haven't found anything useful.
I've found an example for selecting time spans of working hours of a certain user. It's found in the SDK but, given that the example is written as a console application in C#, it might be perceived as complicated an unnecessarily complicated.
Also, it's mentioned that there's a field on the user entity, I assume that for this particular task, JavaScript might be more suitable and such an example I haven't seen.
This page presenting the source code is on MSDN. The bottom line is that you create a service and then execute the below.
QueryScheduleRequest scheduleRequest = new QueryScheduleRequest
{
ResourceId = GetRegardedUserId(),
Start = DateTime.Now,
End = DateTime.Today.AddDays(14),
TimeCodes = new TimeCode[] { TimeCode.Available }
};
QueryScheduleResponse scheduleResponse
= (QueryScheduleResponse)_serviceProxy.Execute(scheduleRequest);
For more information on how to handle the requests to scheduling and working hours see this article and for service appointments look over here.

How do I programmatically create a new TFS Task?

I'm looking to create a Visual Basic Windows Form Application which has similar input fields to the new task creation page on the browser version of TFS. the idea is to automate some of the form filling saving up on time (is, calculating time estimates based on dates taking into account work hours and weekends, automatically filling out fields)
When i search Google however i keep getting results like customizing TFS or how to make a new task using the interface, however what i am looking for is what classes i'm supposed to use to create a new task and then to save it or search current existing tasks.
So How do I programmatically create a new TFS Task if it's possible? (it should be, Visual Basic and TFS are both Microsoft)
There is an example on MSDN. See this page: "Create a Work Item By Using the Client Object Model for Team Foundation".
The core of the example is:
// Create the work item.
WorkItem userStory = new WorkItem(workItemType)
{
// The title is generally the only required field that doesn’t have a default value.
// You must set it, or you can’t save the work item. If you’re working with another
// type of work item, there may be other fields that you’ll have to set.
Title = "Recently ordered menu",
Description = "As a return customer, I want to see items that I've recently ordered."
};
// Save the new user story.
userStory.Save();

SharePoint, notification email workflow

I was wondering if anyone could possibly help me with my SharePoint 2010 issue. I recently created a CRM System within SharePoint for my small business which utilizes a email notification workflow. The workflow is triggered when the 'Action Needed' field has a 'yes' value, this means that 2 days after the information is created or edited the workflow will notify the particular user that further action is needed.
Previous thread with image of the workflow
Now this is great if myself or other members of the team are only inputting a couple of items but I found out the hard way when i keyed in 20 or so items and received 20 individual emails which is irritating as you can imagine.
So on to my issue, I would like the email notifications to be grouped together in one email so it's more efficient and avoids the need for individual emails. So when one particular user creates or edits multiple records instead of separate email notifications I would like it all in one email. So is this possible while using SharePoint workflows? If it is possible and how would I go about expanding my current workflow to achieve this?
I have already asked this question in the dedicated SharePoint area to no prevail, I could really do with the help also if what I am asking is impossible then could someone at least say so.
Thanks very much to anyone who contributes and helps me with my problem.
If you are using SharePoint Designer , then this is not problem. This is because each workflow can access the data on which List Item the workflow is triggered.
However, this is definitely possible using a custom workflow or an event Receiver.
http://msdn.microsoft.com/en-us/library/ms437502(v=office.14).aspx