API call to get who has a document checked out

I see the api calls for checking if a document is checkedout and if the document is checked out to you. but how do I find out who has it checked out, like the name or whatever is listed in the Out To column?


JD

Parents Reply Children
  • Was asked for the code, here it is for c#, i have my own dll for all the wrappers and PWConstants., but other then that should be pretty straight forward.

    //check if its checked out by someone else
                                int intlocations = PWWrappers.aaApi_SelectLocationsByProp(selSheet.propFolderID, selSheet.propFileID, -1, PWConstants.AADMS_CHECKED_OUT, null, null);
                                if (intlocations > 0)
                                {
                                    //get the user id at the first location record 
                                    int userID = PWWrappers.aaApi_GetLocationNumericProperty(PWConstants.LOC_PROP_USERID, 0);
                                    if (userID != 0)
                                    {//get user from userID
                                        int gotuser = PWWrappers.aaApi_SelectUser(userID);
                                        if (gotuser == 1)
                                        {//get user name
                                            userName = PWWrappers.aaApi_GetUserStringProperty(PWConstants.USER_PROP_NAME, 0);
                                        }
    
                                    }
                                }