Friday, April 30, 2010

Walkthrough: Released Prod. Order > Line > Prod. Journal

Line form
ShowProductionJournal
"Production Journal Mgt" codeunit > Handling
CreateJnlLines
InsertOutputJnlLine

Monday, April 26, 2010

AS: Defining cube role using script

Syntax:
http://msdn.microsoft.com/en-us/library/ms133261%28v=SQL.100%29.aspx

Sample 1:
' Create the XML syntax to be used for the SetPermissions method
' of the Role object.
sDimensionSecurity = " "DefaultMember=""[Store].[Store Country].&[USA]"" " & _
"VisualTotalsLowestLevel=""[Store].[Store City]"">" & _
" "DeniedSet=""{[Store].[Store Country].&[Canada]," & _
"[Store].[Store Country].&[Mexico]}"" " & _
"Description=""USA Store Restriction""/>" & _
"
"

' The preceding XML syntax limits the users of the database role
' to viewing only stores in the USA, by denying read access to
' stores associated with the Mexico and Canada members of the
' [Store Country] level of the Stores dimension.

dsoRole.SetPermissions "Dimension:Store", sDimensionSecurity

Sample 2:
AddCubeRole "srvr", "BA for MBS Navision 400", "Sales", "Test Role", "domain\test"

Sub AddCubeRole(sServer, sDatabase, sCube, sRoleName, sUserList)
Dim dsoServer
Dim dsoDb
Dim dsoCube
Dim dsoRole
Dim sDimSecurity

Set dsoServer = CreateObject("DSO.Server")
dsoServer.Connect sServer
Set dsoDb = dsoServer.MDStores(sDatabase)

'// If a role with the same name exists - remove it
If dsoDb.Roles.Find(sRoleName) Then
dsoDb.Roles.Remove (sRoleName)
End If
Set dsoRole = dsoDb.Roles.AddNew(sRoleName, sbclsRegular)
sDimSecurity = " " & _
" "UpperLevel=""[Principal Code].[Principal Code]"" " & _
"AllowedSet=""{[Principal Code].[Principal Code].&[01]}"" " & _
"/>" & _
"
"
dsoRole.UsersList = sUserList
dsoRole.SetPermissions "Dimension:Principal Code", sDimSecurity
dsoRole.Update

Set dsoCube = dsoDb.MDStores(sCube)
'// If a role with the same name exists - remove it
If dsoCube.Roles.Find(sRoleName) Then
dsoCube.Roles.Remove sRoleName
End If
dsoCube.Roles.AddNew sRoleName
dsoCube.Update

dsoServer.CloseServer

Set dsoCube = Nothing
Set dsoRole = Nothing
Set dsoDb = Nothing
Set dsoServer = Nothing

End Sub
---

Still don't know how to retrieve list of current permission.
Closest found so far:
Accessing Roles Permissions via DSO
ASP, DSO and Getting the UsersList from a role

Wednesday, April 21, 2010

Conditioning new [laptop] battery

Before you use a battery pack for the first time, there is a
"conditioning" process that you should follow:
1.Insert the new battery without turning the computer on.
2.Connect the AC adapter and fully charge the battery.
3.Disconnect the AC adapter.
4.Turn on the computer and operate using battery power.
5.Fully deplete the battery until the battery-low warning appears.
6.Reconnect the AC adapter and fully charge the battery again.

Follow these steps again until the battery has been charged and
discharged three times.
Use this conditioning process for all new batteries, or if a battery hasn't
been used for a long time. If the computer is to be stored for more
than two weeks, you are advised to remove the battery pack from the
unit.

Source: Acer Generic User Guide
---

... new Toshiba laptop batteries ... must have a first charge of twelve to fourteen hrs - and this must be done on the A/C wall adapter - rather than other charger, such as a cigarette charger. It doesn't matter what any charge indicator light says, wait the full time before disconnecting. It is recommended that you fully charge and discharge your new battery 2 to 4 times to allow it to reach its maximum rated capacity.
... Every month or so exercise your battery

Source:
Tips for Keeping New Toshiba Laptop Battery In Good Health
www.prlog.org/11314932-tips-for-keeping-new-toshiba-laptop-battery-in-good-health.html
---

TOSHIBA: To exercise(?) your battery see section "Extending Battery Life" in User's Manual (PDF)
---

Thursday, April 15, 2010

Backup cube role settings

Open this folder:
[MS AS Data folder]\ [Database name]

Backup files with .role extension
**UPDATE**
It won't work! Copying .role files cannot restore role settings.

Alternative:
Creating cube role using script ** NEVER TRIED YET **
Google: automate|script cube role sql 2000

DSO Script: Adding a Role to a Cube
http://geekswithblogs.net/darrengosbell/archive/2006/06/13/81702.aspx

Tuesday, April 13, 2010

Value Entry: For Type=Purchase, what is the difference between Cost Amount and Purchase Amount?

For entries inserted by Adjust Cost-Item Entries batch, an entry related to a Purchase RETURN will have non-zero Cost Amount while Purchase Amount will remain empty(zero).

Running XP applications on Windows 7

Set Up and Use XP Mode in Windows 7
http://lifehacker.com/5245396/set-up-and-use-xp-mode-in-windows-7

Saturday, April 10, 2010

Vmware Server: Datastore Browser could not successfully retrieve data from the server

One possible cause is that the folder containing VMs is not accessible when vmware daemon is started.
After checking that the folder is now accessible, restart vmware daemon:
/etc/init.d/vmware restart

If it fails, try:
Select datastore in question
Click Commands > Refresh Datastore

If it fails, try the following:
1) re-Add VM, or
2) re-create datastore

Friday, April 9, 2010

BT4Final: Start [Wireless] Network Manager

From console, run:
/etc/init.d/wicd start

Then launch Wicd Network Manager from menu

Friday, April 2, 2010

Tes Laptop Bekas (Indonesian)

Cara Mudah untuk Memilih dan Membeli Laptop Bekas
http://aimyaya.com/id/komputer/cara-mudah-untuk-memilih-dan-membeli-laptop-bekas/