In a powerpoint slideshow I saw about code contracts they right click on some code and get the option to "extract method with contract".
But I dont get that option?
How is it possible to extract a method with contract?
Regards
Related
(Questions with an answer of NO are still useful; they're just not the solution to the problem. Answers say, no, there is no built-in, you have to implement the dialog for yourself...)
In VBA, (ms-word, or ms-excel, but seems like a generic operation) is there any way to simply a provide a collection to a built in dialog in order to prompt the user to select a value from a list of values?
I can't believe there's not a built in method to do this, it seems like a such a generic operation that could be coded once and everybody would re-use it. I can certainly hand code it, but why bother if it's already in the vba libraries someplace.
I've searched for a solution, but it does appear that the standard answer is to hand code it.
My aproach would be to create a Form, add a ListBox, Ok, Cancel and the ShowModal property.
To use it first set the ListBox RowSource according to what you need:
https://msdn.microsoft.com/en-us/library/office/ff196460.aspx
Then make it visible, manage Ok/Cancel and then use the ItemsSelect property (multiselect is possible):
https://msdn.microsoft.com/en-us/library/office/ff823015.aspx
Yup, no such thing.
Hand-code it, and keep it as part of your VBA "toolbox" - make yourself an add-in that other VBA projects can reference, so you can reuse the code without having to rewrite it every time.
Then export the code modules from your host document, upload them to a GitHub repository, and share your solution with the world so the next person looking for it doesn't need to implement it from scratch again.
The VBA standard library is rather limited, and beyond MsgBox there isn't much available in terms of built-in UI. That's just how it is.
As you can probably take out from the title, I have a problem on my CRM environment converting a fax entity to an incident (case), it is as you know an out of the box functionality. When I press the button on the ribbon to convert it to a case, I'm given the following error: "You must save the changes before you can convert this activity". And I have definitely saved everything before I do this.
I do have the latest rollup and it works for the other activity entities except from this one. Is there any chance someone had similar issues? If so could you share how you resolved this. Thanks in advance.
There is likely some code running on the form that updates one or more values on the page automatically. Code like that will cause the form to become "dirty". Which is what triggers the message you are seeing.
One way to solve it, is modify your code to perform a save after it make its changes.
I have a MSFlexgrid in my application where i have rows and columns and I tried to automate using CodedUI. And I am trying to spy the cells inside the MSFlexGrid but CodedUI is unable to spy the cells and it shows as below when tried to spy the cells it shown as Client as a ControlType. So, please help me to resolve this.
That's an ActiveX control. I don't think Coded UI has built in support. You can try the options here MSDN SOCIAL
First option, not very reliable, click the grid control in specific coordinates. It will work if you always have to select the top row and the grid sise doesn’t change rapidly.
The second option, much better functionality requires a lot of effort. You will have to wrap the grid control with a shell that implements an accessibility API to make it testable. It is a lot of work and I wouldn’t have suggested the first option if it wasn’t so difficult.
I have written a Dialog that uses an Advanced Find where the user types in part of a search term, i.e., similar to:
Dialog’s Query Step: Demystifying the Advanced Mode Capabilities.
In my case I created one to find all the Contacts in a post code area starting with "xyz..."
It works fine and I get the contacts in a picklist. How can I get this in a grid of results like you can for a regular advanced find? As I understand it the Query CRM data operation only gives you radio buttons or a list as output types. But is there some ingenious way of grabbing the results perhaps via a child workflow and writing them to a grid?
I'm sure you're looking for something a little more out of the box, but one approach would be to use an HTML web resource. You can mimic the dialog look and feel by using the CRM 2011 Style Guide included in the SDK (in the sdk\resources\styleguide folder).
I think this cant be done out of the box. You can of course create a webresource and then embed the advanced find view using fetchxml query.
Please take a look at the following url. Hope it helps.
http://crmentropy.blogspot.com/2009/11/embedding-advanced-find-views-in-entity.html
HI all,
I am creating a timesheep app and I have five colums that can contain hours worked. When the user enters a new form how do I check to see if at least one of the columns contains data. I must admit I am not a developer just a Sharepoint/Sharepoint designer hack so be nice. Thanks
Glenn Thibeault
The only bullet-proof way would be to create a SharePoint event receiver using C# (lots of examples on the web).
I'm not really sure how you could accomplish this with SPD.
If you don't want to write any C# code, that really only leaves JavaScript. It will still take development work (this is a programming site after all). You could probably take advantage of SPUtility.js (full disclosure, this is a library I maintain).
The basic steps would be:
Edit your NewForm.aspx and add a Content Editor web part
Inside the Content Editor web part, write your JavaScript:
Attach a new onClick handler to the NewForm.aspx's "OK" buttons
Use SPUtility's GetValue method to get the value of your 5 fields, validate one has a value, and display a message if invalid