PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/5/2010 9:17 PM by  Scott Ward
V10 - Changes to schema
 3 Replies
AddThis - Bookmarking and Sharing Button
Sort:
You are not authorized to post a reply.
Author Messages
Ben Harrison
New Member
New Member
Posts:2
Points:4


--
10/3/2010 11:29 PM

    Hi

    I'm going through the process of modifying the code I had written to show users jobs and to let them create new ones. Based upon my initial findings, 1) the schema has changed in version 10 and 2) some of the methods have changed prototypes.

    Where do we get the latest help file and/or sample code from?

    As an example, the following line of code now causes an error

    newJob.Attachments.Add(attachment.File, attachment.FileName, attachment.FileName, settings.AttachmentTypeID);

    Error 2 The best overloaded method match for 'HelpMasterProAPI._Attachments.Add(byte[], string, string, string)' has some invalid arguments C:\Visual Studio 2005\Projects\Web Services\XXXHelpMasterProSelfServiceWebService\XXXHelpMasterProCommon\HMPAPI.cs 158 25 XXXHelpMasterProCommon
     

    Previously AttachmentTypeID was an int linking back to a system code as returned by querying 'dbo.qrySystemCodes_AttachmentTypeLink'

     

    As a more generic issue/request - currently we have to write code to return a collection of jobs and their associated objects (V9). The api only allows you to create/update jobs. It would be nice if the API was to actually provide the objects itself, and we just reference them.

    e.g. HMPAPI.GetOpenJobs () returns a collection of jobs that are open

    HMPAPI.GetClosedJobs() would do similar for the closed jobs.

    A job object would then have a collection of actions etc...

    This would allow you to do full object drill down. Attachments would need to be handled in a special way as you do not want to be returning large files unless they are required (perhaps a file path/id is returned and the developer had to get that file seperately, of a method on the job/action lets you get the attachment if required)

    This would allow us to write code such as

    HMPAPI.JobCollection jobs = HMPAPI.GetOpenJobs("xxxxxx");

    foreach (Job job in jobs)

    {

           Action newAction = new Action ();

           ...Update Action details

           newAction.Attachments.New(file....);

           job.Action.Add (newAction );

     

    }

    etc...

     

    Scott Ward
    HelpMaster development team
    Helpdesker
    Helpdesker
    Posts:25
    Points:29


    --
    10/4/2010 7:40 PM
    We have updated the attachments for v10, the AttachmentTypeID is no longer used.
    For version 10 we now make the attachment type generate automatically using the extension of the file to get the Windows file type text from windows, it no longer links to the system codes table.

    The Parameters are now
    Filename: the attachments full path and filename
    Title: the display title for the attachment
    Type: This is optional if entered it should be the attachment type eg(Bitmap file, Text file, etc)
    If left blank it will look this up using the extension to get the windows file type as shown in windows explorer, this is the recommended way to use this.

    an example of this is
    myJob.Attachments.Add("c:\screenshot.bmp", "screenshot")

    We will upload the v10 HelpMaster API Help file to the API section today so you can get it from there.

    Thanks for the ideas for API improvements, we will take them in to consideration when designing any new versions.
    HelpMaster development team.
    Have you seen what's new in v13 yet?
    Ben Harrison
    New Member
    New Member
    Posts:2
    Points:4


    --
    10/4/2010 11:56 PM
    Unfortunately, the function prototypes do not match with what you have posted Scott.
    First overload prototype is void _Attachments.Add(string Filename, string Title, string Type)
    Second overload is void _Attachments.Add(byte[] Bytes, string FilenameTitle, string Title, string Type)

    I am using the second as I am passing the file via a web service

    I am using build 10.0.0.165
    Scott Ward
    HelpMaster development team
    Helpdesker
    Helpdesker
    Posts:25
    Points:29


    --
    10/5/2010 9:17 PM
    The protypes are correctly posted
    The third parameter Type is optional so does not neeed to be entered.
    If you are using a language that does not support optional parameters the you can just pass an empty string "" for the Type parameter.

    The second overloaded method is as stated

    Bytes: The Byte array of the file to attach
    FilenameTitle: The File title of the attachment including the extension
    Title: The display title for the attachment
    Type: This is optional if entered it should be the attachment type eg(Bitmap file, Text file, etc)
    If left blank or an empty string "" it will look this up using the extension to get the windows file type as shown in windows explorer, this is the recommended way to use this
    HelpMaster development team.
    Have you seen what's new in v13 yet?
    You are not authorized to post a reply.


    New version - HelpMaster v24 now available! by Rod Weir in Announcements with 0 replies A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpr...-f...

    New version - HelpMaster v23 now available! by Rod Weir in Announcements with 0 replies A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpro.com...

    March 2023 v22.7 maintenance release now available by Rod Weir in Announcements with 0 replies A maintenance release for v22.7 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    July 2022 release now available - New version released! by Rod Weir in Announcements with 0 replies A new feature release of HelpMaster is now available!  v22.7.22 For a list of the major new features of v22, see the new documentation site ht...

    June 2022 v22.2 maintenance release now available by Rod Weir in Announcements with 0 replies A maintenance release for v22.2 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    RE: Use PowerBI for HelpMaster dashboards by Rod Weir in Reports and reporting Hi SR, Thanks for the post. Yes, the PowerBI reports for HelpMaster have been well received. Download the latest version, from here. https://www...

    RE: Use PowerBI for HelpMaster dashboards by Scenic_Rim_IT in Reports and reporting Hi Rod - just wondering how PowerBI reports are going? Any chance you have a beta/pre-release version we can help test for you?...

    New version - HelpMaster v24 now available! by Rod Weir in Announcements A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpr...-f...

    New version - HelpMaster v23 now available! by Rod Weir in Announcements A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpro.com...

    March 2023 v22.7 maintenance release now available by Rod Weir in Announcements A maintenance release for v22.7 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    July 2022 release now available - New version released! by Rod Weir in Announcements A new feature release of HelpMaster is now available!  v22.7.22 For a list of the major new features of v22, see the new documentation site ht...

    June 2022 v22.2 maintenance release now available by Rod Weir in Announcements A maintenance release for v22.2 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    February 2022 release now available - New version released! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v22, see the new documentation site https://docs.helpma...

    November 2021 release now available - New Major Version! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v22, see the new documentation site https://docs.helpma...

    May 2021 release now available - New Major Version! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v21, see the new documentation site https://docs.helpma...