infopath etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
infopath etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

25 Eylül 2012 Salı

Infopath form stuck on deleting status

Hi,


If you have an Infopath form which stucks on "Deleting" status and even you try to retract the corresponding wsp file, it stucks on "Retracting" you should delete the solution using stsadm.

People keep saying that I should restart the admin jobs using the "stsadm -o execadmsvcjobs" command but it was not helping.. But please try this before removing everything : ) It s worth to try..

So, since the command was not solving my issue, I ve decided to remove everything and reupload the form from scratch.

To remove the form, you should do 3 things.

1. Cancel the Retracting job
2. Delete the corresponding solution.
3. Delete the form template

Important !!
After cancelling the retraction you should first delete the solution and then you should delete the form template, otherwise it stucks.


Here we go:

Retracting the job:
Central Admin - System Settings - Under Farm Management - Manage farm solutions - Find your solution and Cancel Retracting Job

Then:

Start cmd as Admin, Go to the 14 hive and type the commands below:

DELETE SOLUTION on STSADM
stsadm -o deletesolution -name YOUR_WSP_NAME.wsp -override

REMOVE FORM TEMPLATE on STSADM
stsadm -o removeformtemplate -formid FORM_ID

To see the form id of your form:

Central Administration - Manage Form Templates - Go to Properties of the desired .xsn form
Get the text in Form ID: section (it starts with urn:schemas-microsoft-com: ...)

Now you are good to go..

Try to reupload and publish your form.

Cheers

edit:
Actually, reuploading the  form did not resolve my problem, there is something really weird going on on my machine.. I ll share the resolution if I can find any.

24 Eylül 2012 Pazartesi

Sharepoint 2010 - Infopath Form deployment stuck on installing status

Hi,
Sometimes while deploying an Infopath 2010 form on SP server, it stucks on status "Installing".

Don't wait !

First, Cancel the scheduled job:

Go To Central Administration - System Settings - Manage Farm Solutions - Cancel the scheduled job

Then,

Just restart Sharepoint 2010 Timer and Sharepoint 2010 Administration services

To do that:

Open command line as admin

net stop "Sharepoint 2010 Timer"
net start "Sharepoint 2010 Administration"
net stop "Sharepoint 2010 Timer"
net start "Sharepoint 2010 Administration"

And try to deploy it again, hope it works : )

Cheers

Sharepoint 2010 Uninstall a feature

Sometimes if you restore a site collection, you might need to deactivate and uninstall a infopath form and reupload it.

To do that, first go to your site - Site Settings - Site Collection Administration (Go to "Go to top level site settings" if necessary) - Site collection features - Deactivate the feature.

Get the GUID on the link, you ll need it to uninstall

Then,
Uninstall the corresponding feature using stsadm

stsadm.exe -o uninstallfeature -id 9fd01052-5564-8ed4-e2b7-a563e9898f08 -force

Sometimes, copy-pasting above code does not work, simply write it yourself.


Bye !


19 Mart 2012 Pazartesi

Sharepoint changing max char property of multiline text field


Hi,
Since the default max char limit of any text field in sharepoint is set to 255, in order to increase it there are several ways.

One of them is writing a small csharp code as below:

using (SPSite mySite = new SPSite(siteName)) //site name
                {
                    SPWeb myWeb = mySite.OpenWeb();
                    SPList myList = myWeb.Lists[listName]; // Your document library Name
                    SPField myField = myList.Fields[fieldName]; //Your multiline field name
                    ((SPFieldMultiLineText)myField).UnlimitedLengthInDocumentLibrary = true;
                    myWeb.AllowUnsafeUpdates = true;
                    myField.Update();
                    myWeb.AllowUnsafeUpdates = false;
                }

In my case, I had a multiline field in infopath form and if you promote it with default settings it would have max char length 255.

Better way to achieve this problem, is creating a new custom field, with multiline text option and `Allow unlimited length .. ` property to Yes.

Then,
You can open Infopath and in the Form Options - Promoting settings, you can manually map your multiline field with your custom multiline field.

There you go, now you have a unlimited field !.


In my case, I have used this field to keep the repeating table data as json string, to read it in a custom sharepoint web page.


Third case is:

If you have created the field as singleline and already promoted but you ve realized that you needed as multiline to allow unlimited string, what you need to do is : (yeah, that was my case : ) )

1. Open the Infopath form, change the texbox field to Multiline.
2. Publish the form
3. Open the Sharepoint Manager, find the field and change the readonly property to false
4. Open the list in sharepoint, go to library settings, in the columns section, edit the propery and change it to multiline text by allowing unlimited length.
5. Yeay !

9 Mart 2012 Cuma

Infopath Change a field in a one instance of repeating table

Hi,
If you like to change a field in one instance of the repeating table, please follow the link:

http://blogs.catapultsystems.com/sboldt/archive/2009/08/10/get-current-row-value-from-an-infopath-repeating-table.aspx

Basically you just need to use sender e.Site.CreateNavigator() method.
then use .MoveParent() method to access the current instance
Then use SelectSingleNode with "my:FIELDNAME" parameter.

8 Mart 2012 Perşembe

Infopath browser ignores OnChange Events

If you have Infopath forms which have onChanged events set on your controls. (i.e. TextBox, ComboBox), if you publish your forms with default settings you ll see the browser based forms ignore the OnChange events.

In order to fix that,
You should open the Properties of the each control bound with the event, go to Browser forms tab and Choose Always for Postback settings.




16 Şubat 2012 Perşembe

Sharepoint Infopath getting logged in username in Forms Authentication

If you use Claims Based Auth., you cannot get a proper username with the command ın Infopath:


this.Application.User.LoginName

You ll get something like :
i:0#.|PROVIDERNAME|Username

You can replace the string but it 's not a proper way to do it.

You can use 2 methods:

1.  SPUser user = SPContext.Current.Web.CurrentUser;
user.userName would get you the proper name

or

2.

string userName = null;
SPClaimProviderManager mgr = SPClaimProviderManager.Local;
if (mgr != null)
{
       userName = mgr.DecodeClaim(SPContext.Current.Web.CurrentUser.LoginName).Value;
}