Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Problem with Show Actions

  Asked By: Umesh    Date: Nov 10    Category: Sharepoint    Views: 737

I have written a custom import tool using VB6 and the Sharepoint
PKMCDO object model, which automatically replicates a folder
structure on the file system into sharepoint and checks all documents
in as published.

The problem I have is that when I use a custom document profile, when
searching in the browser clicking on "Show Actions" for the document
actually opens the document in IE Word, Excel etc, rather than
showing the document actions. If, however, I check in the document in
using "base document", then "Show Actions" works properly.

I've tried doing a custom profile which is an exact copy of "base
document", just in case there is a problem with the way I am saving
properties, but I have the same problem.

If anyone has any suggestions as to why this might be happening then
I'd be grateful.



6 Answers Found

Answer #1    Answered By: Kamal Mayachari     Answered On: Nov 10

I have done this with VB6 and PKMCDO and have not had any problems.
Did you try to create a very simple piece of code that only
imports/check-in/publishes a single document  and see if that works. If
not can you post the code to this group?

Answer #2    Answered By: Kelsie Terrell     Answered On: Nov 10

I've tried just about everything! :) I know there's nothing wrong
with my checking-in code because it works  perfectly on several other
Sharepoint projects I am working on.

The error with "Show Actions" seems very sporadic and you can't
really replicate the errors reliably. For example, me and my boss
created identical profiles on our Win2k SPS servers, and then ran the
routine to import  8 identical documents + file  structure. On his
the "Show Actions" opened the documents when you clicked on them, but
on mine it worked "Show Actions" worked perfectly.

Other experiments importing onto my server with these 8 documents
lead to 4 of the documents' "Show Actions" working properly, and the
other 4 opening the document  - and that was in the same import!

Anyway I am going to leave it for a day or two now and work on
something else before I through my laptop through the window!

Answer #3    Answered By: Puneet Shiwde     Answered On: Nov 10

I hope you did't throw your laptop away, so that you can read the
following :
we had exactly the same problem, and finally we found that we did not
use the right case  for the profile  in our code : the profile name
seems to be case sensitive. We don't understand why this mistake
leads to the wrong link on "show actions", but as soon as we used the
right name, we did not have any trouble anymore. Check this and let
me know !
By the way, if someone has an explanation for this strange behaviour,
it would be nice !

Answer #4    Answered By: Brandyn Slater     Answered On: Nov 10

Yes. My problem  is that the import  routine makes a call to Sharepoint
to list all of the profiles for selection, for a particular
workspace. Sharepoint then returns all of the customs profiles all in
block capitals - yet the system  profiles (base document  etc) are all
in proper case.

What's stranger is that this anomily is still rather sporadic - some
of them work and some of them don't. Anyway, it looks like if you get
the case  right it always works  - so you've been a big help! :)

My code for returning the list of profiles (as a comma delimited
string) is below, which basically just trims the "_CC.XML" out of the
profile and strings them together. I now need to see why my custom
profiles are returning as upper case :-

Public Function GetProfileList( _
ByVal p_strWorkspace As String _
) _
As String

Dim f_objPKMWorkspace As KnowledgeWorkspace
Dim f_objPKMContentClass As KnowledgeContentClass

Dim f_strBuffer As String
Dim f_varContentClass As Variant

Set f_objPKMWorkspace = New KnowledgeWorkspace

f_objPKMWorkspace.DataSource.Open p_strWorkspace, , 3

For Each f_varContentClass In f_objPKMWorkspace.ContentClasses
Set f_objPKMContentClass = f_objPKMWorkspace.GetObject
f_strBuffer = f_strBuffer & _
Mid(f_objPKMContentClass.DisplayName, 1, Len
(f_objPKMContentClass.DisplayName) - 7) & ","
Next f_varContentClass

GetProfileList = Mid(f_strBuffer, 1, Len(f_strBuffer) - 1)

Set f_objPKMWorkspace = Nothing
Set f_objPKMContentClass = Nothing

End Function

Answer #5    Answered By: Hubert Pollard     Answered On: Nov 10

Basically I was getting the XML display
name (e.g. MYPROFILE_CC.XML) which for some reason puts custom
profiles into upper case, and stripping the "_CC.XML" from the end.
If I just use the content class itself I get "urn:content-
classes:MyProfile" but at least the profile  returns in the correct
case so I can just strip the prefix and use that.

Answer #6    Answered By: Gladys Trevino     Answered On: Nov 10

Even we had face this problem.Please check  the urn
that you are specifying for the profile  in your
checkin code.it should exactly same as that which is
that appears in the Document Profile --> Properties

Didn't find what you were looking for? Find more on Problem with Show Actions Or get search suggestion and latest updates.