Chox’s Blog

Chox juga mau belajar nge-blog

Category Archives: MOSS

Update Task via Console Application

The case is to update task that created from an instance of workflow, using console application.

The common mistake is used method of Update from SPListItem.

And the result is the task actually already updated, but the workflow has been ‘hung’ in this situation. The OnTaskChanged is not triggered. And the workflow has been stop with ‘due to heavy load‘ issue.

Read more of this post

Bizarre Task Scheduler When Run 64bit Console Application

Fresh from the oven.

If you get this case, that you want to create task scheduler that run 64bit console application in Win Server 2008, but with luck. Your code doesn’t do any thing. But if you run manually it will run normally. That’s happen to me.

You can implement this magic trick.

Create folder ‘Desktop’ at this path:

C:\Windows\SysWOW64\config\systemprofile\Desktop

or

C:\Windows\System32\config\systemprofile\Desktop

I just did both. Now its now run like I want.

Reference :ย http://stackoverflow.com/questions/1674836/how-to-run-a-windows-2008-task-from-the-scheduler-with-interact-with-desktop

 

Thanks Mr. Ogawa. You saved me ๐Ÿ™‚

This form was customized not working with attachment โ€“ SharePoint MOSS 2007

The title of this post is an alert pop up, when we used a customized new/edit form then want add some attachments.

So for you that want to create customized form that include that attachment function, you should add some codes to make it works.

1. Find this codes:

<xsl:template name=”dvt_1″>

<xsl:variable name=”dvt_StyleName”>ListForm</xsl:variable>

<xsl:variable name=”Rows” select=”/dsQueryResponse/Rows/Row”/>

<table border=”0″ width=”100%”>

<xsl:call-template name=”dvt_1.body”>

<xsl:with-param name=”Rows” select=”$Rows”/>

</xsl:call-template>

</table>

</xsl:template>

2. Append with this codes

<xsl:template name=”dvt_1″>

<xsl:variable name=”dvt_StyleName”>ListForm</xsl:variable>

<xsl:variable name=”Rows” select=”/dsQueryResponse/Rows/Row”/>

<div>

<span id=”part1″>

<table border=”0″ width=”100%”>

<xsl:call-template name=”dvt_1.body”>

<xsl:with-param name=”Rows” select=”$Rows”/>

</xsl:call-template>

</table>

</span>

<SharePoint:AttachmentUpload runat=”server” ControlMode=”Edit“/>

<SharePoint:ItemHiddenVersion runat=”server” ControlMode=”Edit“/>

</div>

</xsl:template>

note : change the red color with New if you used for New Page Form,

or Edit if you used for Edit Page Form

3. Locate this following code

<xsl:if test=”$dvt_1_automode = ‘1’” ddwrt:cf_ignore=”1″

4. Add this following code above the code of point #3

<tr id=”idAttachmentsRow”>

<td nowrap=”true” valign=”top” class=”ms-formlabel” width=”20%”>

<SharePoint:FieldLabel ControlMode=”Edit” FieldName=”Attachments” runat=”server”/>

</td>

<td valign=”top” class=”ms-formbody” width=”80%”>

<SharePoint:FormField runat=”server” id=”AttachmentsField” ControlMode=”Edit”

FieldName=”Attachments” __designer:bind=”{ddwrt:DataBind(‘u’,’AttachmentsField’,’Value’

,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@Attachments’)}”/>

<script>

var elm = document.getElementById(“idAttachmentsTable”);

if (elm == null || elm.rows.length == 0)

document.getElementById(“idAttachmentsRow”).style.display=’none’;

</script> </td>

</tr>

note :* change the red color with New if you used for New Page Form, or Edit if you used for Edit Page Form

* find __designer:bind=”{ddwrt:DataBind(‘u‘ …. and change to ‘i’ for New Page Form or ‘u’ for Edit Page Form

Source : http://support.microsoft.com/default.aspx?scid=kb;en-us;953271&sd=rss&spid=11373

Error When Update Value Field of List Item – InfoPath Content Type

I have a form library (infopath content type).

That library will include a workflow that will be triggered when a new item has been created.

The problem is I cannot update the field/column of form within a workflow.

It always show me a message “The form has been closed”. It makes me some days (so damn crazy) to find out what is the point of the problem.

I check the logs file from 12 hive folder sharepoint.

Then I found this : “Type: SchemaValidationException, Exception Message: Schema validation found non-datatype errors.

And a found this miracle article (thank you very much)

We just make sure to set PreserveWhitespace of our xml doc object, to true. Before me make some programmatically to edit the form.

Just that, and It’ll run ok.

yeah.. it made me had a headache ๐Ÿ˜€

SMTP Server For Development Phase – smtp4dev

For testing workflow that i have created, I decided to try smtp server that run locally.

So I can run in my SharePoint development machine (actually virtual machine).

After googling and read some blogs I wanna try smtp4dev from codeplex.

If it works perfectly, I’ll continue to write a post about smpt4dev and sharepoint. (even there are so may article outside there, that have been discuss about it. ย hihi….)

lets start ๐Ÿ™‚

Implementing SharePoint with Load Balancing and Karberos Authentication

I found a great article wrote by John Lee (thank you), steps how to implement small medium SharePoint farm using load balancing and Karberos authentication.

Deploy MOSS Medium Farm Using Kerberos Authentication on Windows 2008 Server NLB

I post this to my blog ย just to make a bookmark, maybe I’ll need it someday ๐Ÿ™‚

Enjoy it.

Bye …

Cannot Login web application (MOSS 2007) after changing host header

This is a quick post, after I solved a problem with MOSS 2007. (fresh from the oven)

The problem is showed when I changed the host header of web application from IIS Manager Console.

I have added IP and alias of new host header to host files. But I still cannot login to the site, and that raised 401.1 error page (Unauthorized: Logon Failed).

The issue because the bugs of the windows server itself , that it will reject process of authentication.

And the answer is this Microsoft Hotfix : http://support.microsoft.com/kb/896861

I used method 2:

Method 2: Disable the loopback check

Follow these steps:

  1. Click Start, click Run, type regedit, and then click OK.
  2. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  3. Right-click Lsa, point to New, and then click DWORD Value.
  4. Type DisableLoopbackCheck, and then press ENTER.
  5. Right-click DisableLoopbackCheck, and then click Modify.
  6. In the Value data box, type 1, and then click OK.
  7. Quit Registry Editor, and then restart your computer.

After that, I can login again and browse the site normally. Wtf!!

There are some articles that help me to solve this problem. Thank you very much.

How to Hide Quick Launch Menu in Sharepoint

  1. Add Content Web Editor Web Part
  2. Edit -> Modified Shared Web Part -> Click Source Editor button
  3. Add this CSS script

    <style>
    .ms-navframe
    {
    display: none
    }
    </style>

  4. Checklist the “Hidden” property in Layout property of Web Part
  5. OK

Thanks to Todd Bleeker for this posting (http://www.mindsharpblogs.com/todd/archive/2005/10/25/801.aspx)