Chox’s Blog

Chox juga mau belajar nge-blog

Category Archives: Sharepoint

No Mapping Between Account Names and Security ID Was Done

I want to make farm environment, consists of 2 servers (using Windows Server 2008 SP1): AD Server and Application Server (for SharePoint and SQL Server).

After created one fresh installation virtually using vmware then make full clone.

I have configured the domain server and added some user accounts that will be used on application server as acc services.

When I want to install SQL Server on App Server, on step “Server Configuration“, I change the acc service from local account to domain account that I have created on AD Server. And then, there is an error “No Mapping Between Account Names and Security ID Was Done“. I cannot add domain account to run sql services.

After googling, I found the problem occurred because I created those 2 servers via full clone that have same SID on each server. To change one of them, we can use sysprep application. That’s it, after waiting a few minutes for windows to re-configure, I can install SQL Server on App Server.

Reference : http://www.brajkovic.info/windows-server-2008/windows-server-2008-r2/how-to-change-sid-on-windows-7-and-windows-server-2008-r2-using-sysprep/

Advertisements

Cannot Add New ‘Completed’ Task With PSI

I’m facing a case that I cannot add task with 100% progress (completed task) with PSI programmatically.

I need to import/sync tasks from another system to Project Server. The task include some custom fields. There is no problem, if I add tasks when the property %complete is less then 100% (not complete). But if there is a task with 100% complete exist, after do QueuePublish method at the end, nothing has changed to the project. All tasks have not added to the project.

After a few hours trial-and-error, I still cannot found the solution.

Then I do some cheating flow, that I add/insert the task directly to the database. Of course Microsoft not recommend this way. But it works for me.

Some property and value that I have to inject manually to database (table Draft and Published) :

  1. Task_Pct_Comp : 100
  2. Task_Pct_Work_Comp : 100
  3. Task_Act_Finish, equals to Task_Finish_Date
  4. Task_Stop_Date, equals to Task_finish_Date
  5. Task_Act_Dur, equals to Task_Dur

That’s it.. When opening project in Project Center, I can see the task has completed with thick mark at the left column 😉

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 🙂

Update Task With Content Type

Ok noted,

When we want to update task with content type in sharepoint, we have to set value ‘Completed’ property of task.

Or you will get NullReferenceException.

If you used client context, you just get ‘Unknown Error‘  (hiks…. pesan error yang suram T.T)

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 🙂