Can you please explain on how we can set ActivityId in Semantic Logging by using .Net 4.5.1 - slab

Can you please explain on how we can set ActivityId in Semantic Logging by using .Net 4.5.1?

You can use the EventSource.SetCurrentThreadActivityId to set the current thread activity ID. If you need to link two activity IDs then use the WriteEventWithRelatedActivityId method instead of the usual WriteEvent.
See Activity tracing and sampling for more information.

Related

SharePoint List 'NoCrawl' with Graph API

The SharePoint API to GET a list, shows the boolean property 'NoCrawl' in its response. This property can be set by altering the settings for the Search availability and Offline access through the settings.
GET https://{site_url}/_api/web/lists/GetByTitle('List Title')
However the Graph API counterpart doesn't have this property.
GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/
Update - Seems there is no way right now other than using the old SharePoint API itself. I'll keep the question open if in case the feature in inculcated.
As Shiva updated there is no such property called NoCrawl as of now in the public document and any relationship for expanding even in beta. Being said that I remember a related thread which works in SharePoint online rest api, which you may want to give a try with Microsoft Graph and see if it helps your scenario.

Salesforce - Does Schema class describe methods cached at salesforce end?

I have a requirement where I want to check permission for salesforce custom object & fields before every DML. as a solution, I have implemented my own versions of DML statements like Util.insert, Util.update etc.
In those methods, I am doing permission checks using Salesforce 'Schema Describe' methods.
I was trying to find information about internal working of these methods, If salesforce cache this information for single execution context or caching should be handled at my end for better performance.
I could not find any information about this in their official documentation.
appreciate any help on this.
Thanks.
You can do it manually if you want but there is this project on git that utilizes an access controller to test for FLS and CRUD issues. We implemented it and it works very well.
https://github.com/CodeScience/CSUtils/wiki/Using-Security-Coding-Library-(ESAPI)

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

Sharepoint REST API + unable to Update Extended properties

Currently we are consuming Sharepoint 2013 REST API; As per requirement we need to update certain extended properties. e.g. "IsCompleted" property of workflow.
Currently we are using following link for rest api
http://msdn.microsoft.com/en-us/library/office/jj860569(v=office.15).aspx
Can you please help out to resolve this issue.
Thanks in advance
This is a read only property. You cannot update it. There is no setter.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflow.iscompleted(v=office.15).aspx
And logically too, this property would reflect the current state of workflow. To mark it completed, you would have to complete the workflow.

How to Get TFS Field values dynamically?

there is a scenario like "I have a field value in TFS which has just been changed by my team member.Can I get the value of that changed field into an application immediately it is changed?".. Pls tell me how to acheive this using C#.net.. thanks in advance
You either want to look into SOAP subscriptions, or writing a tfs server plugin that forwards updates to your app. I'd probably recommend doing the latter of the two options.
Team Foundation Server 2010 Event Handling with Subscribers
If it is imperative that your application not miss any updates (eg you're writing a sync) the you'll probably want to put a servicebus in as the transport between the plugin and your application.
Alternatively you could go with the polling up update approach, looking at each work items history to see if it has changed. Seems like a lot more work, with no real benefit.

Resources