Method Community

 

MethodAPI v1.1 update - ability to add new tables and fields

Last post 01-20-2009 3:29 PM by Method_Paul. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-07-2009 4:22 PM

    MethodAPI v1.1 update - ability to add new tables and fields

    Hey developers,

    I wanted to let everyone know that we made two API calls available today: MethodAPICreateTable and MethodAPICreateField.

    These simulate what you can do directly in the Method web app, under Customize > Tables / Fields.  So in other words you can create your own tables, as well as add fields to existing tables.  Fields can be Text, Decimal, Integer, DateTime, Money, YesNo, Picture.....and yes, of course, Dropdown.

    Here is the updated API documentation:

    http://www.methodintegration.com/documentation/MethodAPIv1_1_Documentation.pdf

    Paul

  • 01-07-2009 7:14 PM In reply to

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Yes Paul you guys rock!!! Cheers Brent
  • 01-08-2009 4:55 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Thanks for adding this!

    Just FYI when I do the createField call I get an error that says "Failure. The API could not validate your log in.  Please make sure you have entered the correct Company Account, User and Password, and that each are spelt correctly.  Also, ensure that this User has been configured for Method API access by going to Customize > Users, editing the User, and ensuring that there is a check in the 'Is Allowed to Connect via MethodAPI' checkbox."

    I only get this error with createField and although I get the error message the field DOES get added to Method


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 01-09-2009 3:13 PM In reply to

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Hey Matt -

    Both Peter and I tried it here and couldn't duplicate the problem. Everything worked fine on our end with no messages.

    Was it a certain table you were having problems with, or all tables?

    Does it happen every time?

    Paul

  • 01-09-2009 8:19 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Paul,

    I Deleted all the fields nad tables I created through the API and tried it again, now I'm not having any problems. Got me?

     

    On a related note (I think, because I didn't notice it until after using the create table and create field calls)....

    When I go to customize the customerlist screen, there are fields available to put on the screen that aren't in the customer table. Any reason that could be? If you think I'm crazy and wanna have a look-see, email me at matt@apexservices.net and I'll give you my name and password.


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 01-12-2009 11:34 AM In reply to

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Hmmm....hard to say what the original problem was.  We were getting a few error messages from the API, after it was first released, which we were quickly able to solve.  Not sure if those errors had anything to do with you, so we'll keep an eye on it.

    For the customer screen, yes, it is confusing.  Since the Customer is actually a "view" of the overall Entity table which contains all Customers, Vendors and Employees, you see fields under Customize > Tables for "Customer" which actually belong to "Employee".  We are aware of this being confusing, and it's on our list of things to improve.

    The other table like this is "Item" where all the "ItemService", "ItemInventory", etc. show all fields in the Item table, not just those that pertain to their type.

  • 01-12-2009 4:49 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    As far as the random fields......they are not fields from another table either. Their names are very similar to the names of some of the fields I added through the API.


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 01-19-2009 4:02 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: MethodAPI v1.1 update - ability to add new tables and fields

     I was able to reproduce this error again. Here is what I did:

    I created a new table

    I created a new field in that table (however, unbeknownst to me the field name that I tried to use is a reserved word and therefore was not able to be added.

    I then tried to insert records into the new table (obviously not going to work because the field could not be added to it). When I attempted to insert the records I got the error "It does not appear the field Day exists in the table."No problem here.

    Now when the program tried to continue adding fields to the customer table I got the following error each time:

    Failure. The API could not validate your log in.  Please make sure you have entered the correct Company Account, User and Password, and that each are spelt correctly.  Also, ensure that this User has been configured for Method API access by going to Customize > Users, editing the User, and ensuring that there is a check in the 'Is Allowed to Connect via MethodAPI' checkbox.

     

    Hope that helps you to be able to track the issue down.


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 01-20-2009 3:29 PM In reply to

    Re: MethodAPI v1.1 update - ability to add new tables and fields

    Hey Matt,

    We checked into it further using the reserved word "Day", and have put more validation in.  We have tried using the latest API on it, and everything seems good now, and you properly get back the warning about the reserved word, and it causes no havoc this time. 

    Do you want to check your database on your end and ensure all is fixed up?

    Paul

Page 1 of 1 (9 items)