.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Unable to access custom extended property

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :SharePoint

When I try to access the .ExtendedProperties["RequestChangeRequired"].ToString() in the onTaskChanged_Invoked method on a workflow I get the error:  "Object Not Set To Instance of an Object".

I have a custom content type on a task list in a custom workflow.  I want to set my Task to either Approved, Major Change or Minor Change.  So i have 3 buttons on the .aspx page for the content type when the users edit the task.  If they click the Minor button the following code is executed:

public void BtnMinor_Click(object sender, EventArgs e)
            Hashtable taskHash = new Hashtable();
            taskHash["RequestReviewerComment"] = RequestReviewerComment.Text;
            taskHash["RequestApproved"] = "false";
            taskHash["RequestChangeRequired"] = "minor";
            taskHash["Approved"] = "false";
            taskHash["Status"] = "complete";
            SPWorkflowTask.AlterTask(m_task, taskHash, true);

            SPUtility.Redirect(List.DefaultViewUrl, SPRedirectFlags.UseSource, HttpContext.Current);

Then in my onTaskChanged_Invoked method the following code is executed but it fals when it tries to access the "RequestChangeRequired

View Complete Post

More Related Resource Links

Unable to search Custom User Property Created in User Profiles in SharePoint 2010


Hi ,

I have created a custom user property,and created metadata property and added mapping to it, still i m not able to Search in People,Please advise

Problem in Custom Control Unable to find Control To Validate Property


I make a custome control by taking a TextBox and A Regular Expression Validator.When i Use this on a .aspx page it works fine.But when i use this on .ascx page and dynamically load user control on a place holder in .aspx page it through an Error

Unable to find control id '_ctl0:txtEmail' referenced by the 'ControlToValidate' property of '_ctl0:txtEmailRequired'


My Custome control Code is this"--

public class EmailValidator:System.Web.UI.Control, INamingContainer{

private System.Web.UI.WebControls.TextBox textBox;

private System.Web.UI.WebControls.RegularExpressionValidator regularExpressionValidator;

public EmailValidator(){

textBox = new TextBox();

regularExpressionValidator = new RegularExpressionValidator();

IsErrorTextBelow = true;

IsRequired = false;

unable to access control inside webuser control



I have used calender web user control inside my project where i took textbox,button and calender.....but after dragging onto my aspx page....i am unable to access this textbox,calender and button on aspx page...Pls help me to find out the solution.

Custom Server Control Property not maintaining state


I have created a server control consisting of a TextArea and a div under it.  My goal is to create my own asp:TextArea type control.  the div is for a Character count of the text area and seems to work ok but i added a CharacterCountVisible property to the control that is always returning true.  See Proptery definition below


<Bindable(False), Category("Appearance"), DefaultValue("True"), Localizable(True)> Property CharacterCountVisible() As Boolean
        Return _CountBoxVisible
    End Get
    Set(ByVal value As Boolean)
        _CountBoxVisible = value
    End Set
End Property

Note the _CountBoxVisible variable is define inside the class as :

Dim _CountBoxVisible as Boolean = True

What I am trying to do is give the user/coder the option to show/utilize the char count feature.  Can make it disappear with textarea1.CharacterCountVisible = False but setting it to true will not make it display.


What am i missing





ADO.NET: Building a Custom Data Provider for Use with the .NET Data Access Framework


The System.Data.dll assembly in the .NET Framework contains namespaces whose base classes can be used to create custom data providers. These namespaces also define a number of data access interfaces and base classes that let developers create data providers that will interoperate with other custom providers. Using the ADO.NET classes Connection, Command, DataReader, and DataAdapter, writing a provider is easier than writing one for OLE DB. This article explains these classes and their implementation, and how they can be used to write a variety of different kinds of data providers.

Bob Beauchemin

MSDN Magazine December 2001

DateTime custom managed property search fails with " Your query is malformed. Please rephrase your q

I've created a front end search page in Silverlight 4 for SharePoint Search.  Currently we are using WSS 3.0 + Search Server Express 2008 (v  The page interacts with the MOSS version of the search web service at:   <site collection>/_vti_bin/search.asmx The reason for this approach is the unique way the requirements specify the look and behavior of the results.  The built-in Search Center page or web parts will not satisfy these requirements. We are going into production but I still cannot figure out how to search against my custom managed properties that are of Type DateTime.  If I cannot get this to work, it is a showstopper. I've tried numerous variations on the SQL Syntax and cannot get it to work.  I know the error is in the date portion of the WHERE clause since I can remove it and searches work fine. Here is a working query: SELECT Size, Rank, Path, Title, Description, Write, RequestSubmittedDate, DocumentType, RequestPromisedDate, ProblemDescription, DatePublished, RequestOwner, RequestingDepartment, DocumentAuthor, ProjectNumber, ProjectDescription, RequestStatus FROM scope() WHERE CONTAINS ('"nmr"') ORDER BY "Rank" DESC yet if I try to use a date literal in the WHERE clause as in the following query modification, I get the "malformed"

Access the SQL Command Query Value Property from the OLEDB Container within a Script Task

Hello, I'd like to Access the SQL Command Query Value Property from the OLEDB Container within a Script Task so I can audit the queries which are executing. What is the syntax for this or does anyone have a sample on how to do this? Thank you

Unable to create columns in document library after applying custom master page to site

Hi, I have applied a custom master page to a site.There is a document library in it. I am unable to add columns in it or change the default view.Nothing happens when I click on OK butoon after making my changes. However the columns are created/default view is changed when I apply the default master page. Guess I am missing some TagPrefix or sharepoint control on master page.I had solved this problem earlier in this way but don't remeber it now. Can anyone help?

Access Model Validation inside Custom Model Binder.

Hello,Is it possible, inside a Custom Model Binder, to fire "something" that "says" the value is invalid so it gets handled by validation part?Basically, I am getting an exception when the value for the property is invalid.Thank You,Miguel

WCF Service Unable to Access Personal Certificate Store Unless Service Account is Logged In

I created a WCF service that has a method which makes a call to a SOAP web service over the internet. In order to make a call to the SOAP web service, it requires that an X.509 certificate be sent with the HttpWebRequest. The X.509 certificates are loaded in the Personal and Trusted Certificate store of the account which the service is running under. When the service account is logged into the server, everything works just fine. However, when the service account is not physically logged onto the server, it has problems loading up the X.509 certificate and fails authentication when trying to make the HttpWebRequest. I am new to WCF services so I don't even know where to start looking. Can anyone please help? Thanks in advance.

custom timer job Access denied sharepoint 2010

Hi, I have a question regarding to custom timer job will be happy if you could help us. The problem is that - owstimer.exe running the timer job crashes. - Question why? Launch debugg in the feature - running the timer job is falling on taskJob.Update (); writes SecurityException  I developed the Job TIMER on moss2007 that everything worked, Now we turned from 2007 to sharepoint 2010 and Job TIMER does not work. I tried to note all of the code is inside the function Execute in  job timer might have something to code blocks. But it also did not help. Eventvwr he writes in the following error: The description for Event ID 0 from source Application can not be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Custom Timer Jobs: func FeatureActivated Access denied. the message resource is present but the message is not found in the string / message table what the solution to that-timer job that will work? Thank you Moshes

Unable to access Entity in controller

 Problem is that when i do like :- Right-click the Models directory and select Add?New Item?Data?ADO.NET Entity Data Model. then generatemodel from a database, it creates OopsData.edmx. and creates entity named OopsEntity. When i try to access this entity in Homecontroller it gives me error like broken reference something. But if i do same thing by right -clicking the project (solution explorer) then i am able to access OopsEntity in HomeController. Reason for asking that is coz i was following the MVC Music Store tut and in it, its done by creating OopsData.edmx in model folder but in my case its not working. Other question is that what is that difference between creating same thing by right clicking on (using) model or solution explorer (project). 

Custom Entity Framework template and access to the database type

First and foremost ... I already made a few changes in the template, the most important one changing the methods generated for stored procedures with OUTPUT parameters and no resultset so that instead of instantiating a few OutputParameter objects, passing them to the method and extracting the values (all without any type checking) you just call the method with a few "out someType?" parameters so I do not need the very basics. I am totally confused by all those GlobalItem, EdmProperty, BuiltInTypeKind, TypeUsage and all this made of objects, all alike and all different though so as soon as I need more data than what's already used by the template I run into problems :-(What I would like is to change the WritePrimitiveTypeProperty() so that it outputs [StringLength(xxx)]  for all char, varchar, nchar and nvarchar properties. But I can't find a way to get from an EdmProperty in the model to the database type in the store.Can anyone help me?In case anyone is interested here's the modified stored procedure mapping code for the template. The first code replaces the original in the .tt: //////// //////// Write EntityContainer and ObjectContext Function Import methods. //////// region.Begin(GetResourceString("Template_RegionFunctionImports")); foreach (EdmFunction edmFunction in container.FunctionIm

unable to create wiki library with bulagarian name via custom ASPX page

hi, I am using one Aspx page where it takes the input from user and create the wiki library with the name entered by User. The issue is , when I am creating name in Eglish it is creating properly. but suppose I give library name  ¿¿¿¿¿¿¿ TEXT 4, I get the following error http://vm2003/ ??????? TEXT 4/Forms/AllPages.aspx?PageView=Shared ?? ??????????. which means ttp://vm2003/ ??????? text / AllPages 4 forms /. Aspx? PageView = shared does not exist. I dont know hwy it is redirecting to this page. but when i check on site , the library gets created with name ??????? TEXT 4 and its URL is http://vm2003/TEXT%204/Forms/AllPages.aspx if you see the bulgarian part is missed, please help.

Unable to access VM network drive in SQL during backup generated by stored procedure

I get the following error in a log file created in the osql command: Msg 3201, Level 16, State 1, Server KAC2KGS2, Procedure usp_Kaman_Full_SqlDB_Backup, Line 150Cannot open backup device 'x:\Servername_master_sqlbu_200703101930.bkf'.Device error or device off-line. See the SQL Server error log for moredetails.Msg 3013, Level 16, State 1, Server KAC2KGS2, Procedure usp_Kaman_Full_SqlDB_Backup, Line 150BACKUP DATABASE is terminating abnormally. The device is established in a CMD file right before the osql command is started that starts my stored procedure.  The CMD in this file is: for /f "tokens=15 delims=." %%i in ('ipconfig^|find "IP Address"^|find "192.168"') do set SUBNET=%%i :loopif exist x:\ net use x: /delnet use x: \\192.168.%SUBNET%.1\backup if not ERRORLEVEL 1 ( goto continue) else ( echo FAILED TO CONNECT TO BACKUP SERVER >> "%SystemDrive%\LogFiles\%Computername%.log" sleep 60 goto loop) :continue echo IP ADDRESS OBTAINED Echo delete old log file if it exists if exist %3\%computername%_kaman_full_sqldb_backup_old.log del /Q %3\%computername%_kaman_full_sqldb_backup_old.log Echo Rename log file to old.log rename %3\%computername%_kaman_full_sqldb_backup.log %computername%_kaman_full_sqldb_backup_old.log echo backup SQL Databases on server will start now osql -E -n -d %1 -i %2\kaman_full_sqldb_backup.sql -h-1 -o %3\%Co

Unable to Customize Custom Lists. Sharepoint Error: User cannot be found.

I am not sure what the best way to put/describe my issue . I am unable to customize my custom list. Steps: 1. Login to sharepoint site. 2. Site Actions -> Site Settings 3. Under Site Administration -> Site Libraries and lists 4. Clicked on a custom list.   Error: Error User cannot be found.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 4063bf58-9cb7-4204-8cc4-cc2889abffe3 Date and Time: 9/9/2010 5:51:58 PM   I figured this may be an issue with site permissions, so I have went into site permissions and removed and re-added Administrator into Homeowners group.   Thank you in advance.   Howie

Custom Workflow Activity dependency property FieldNames

I have a custom actvity in VS2008. All is well until I added a new dependancy property like so: public static DependencyProperty EventLookupColumnNameProperty = DependencyProperty.Register("EventLookupColumnName",typeof(string),typeof(FTFSyncEventToAttachmentListItem)); public static DependencyProperty EventLookupColumnIDProperty = DependencyProperty.Register("EventLookupColumnID",typeof(string),typeof(FTFSyncEventToAttachmentListItem)); [Description("Event Lookup Column Name")][DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)][Browsable(true)][ValidationOption(ValidationOption.Required)]public string EventLookupColumnName{get { return ((string)(base.GetValue(EventLookupColumnNameProperty))); }set { base.SetValue(EventLookupColumnNameProperty, value); } [Description("Event Lookup Column ID")][ValidationOption(ValidationOption.Required)][Browsable(true)][DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]public int EventLookupColumnID{get { return ((int)(base.GetValue(EventLookupColumnIDProperty))); }set { base.SetValue(EventLookupColumnIDProperty, value); }}Then in the actions file:    <Action Name="FTF Sync Event To Attachment List Item"   ClassName="DP.Sharepoint.Workflow.FTFSyncEventToAttachmentListItem"   Assembly="DP.Sharepoint.Workflow, Version=, Cultur
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend