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...