Chox’s Blog

Chox juga mau belajar nge-blog

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 …

Installing (Troubleshoot) Ruby on Rails on Win 7

Just wanna try something new.

I want to install RoR on my desktop.

I have installed Ruby from RubyInstaller, RubyGems and MySQL database.

The first problem occurred when i wanna install Rails.

ruby install rails –include-dependencies

The outcome message was said there is no package called rails from repository.

It seems the installer cannot detect my proxy, so we must mention it as command parameter.

ruby install –http-proxy http://yourproxy:portnumber rails –include-dependencies

ok done.

The when to create db-schema for rails scaffolding, error appears again.

rake db:create:all

From this article, we should replaced libmySQL.dll from our mysql path installation to InstantRails dll.

Try again, check to MySQL, yes the schema has been created successfully.

Try create new class (ex:Customer) using scaffold

ruby script/generate scaffold Customer

Yup, has been created successfully for new Customer class.

Ok, its enough for tonight. See u…

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.

My end of year-gadget

Yeah… I just bought a new iPod touch. Its the best gadget that i have ever had. My fingers are dancing on it’s screen.

Really nice, a wonderfull new experience…

Chrome and its extension

I love chrome. specially now it comes with extensions.

No doubt, I will use chrome longer =)

Then I wanna mention Google as Super Google.

A lot of apps that have been published by Google out there.

Maybe tomorrow,  all we need just a browser (and Google?? hahaha….)

ok see u later,  my chromed bird has been waiting.  tweet…tweet… B-)