Hi I want to learn how to use the WebAPI but I'm not able to authenticate. I always get an authentication error when I try to access any endpoint. This is what I did. Sage 2019 SQL Server 2014 on Server 2016. The web api feature has been installed and I can see it in the IIS console. If I open the Swagger UI in Internet explorer everything loads up fine. And If I visit an endpoint directly a username and password box pops up. I also created a user called WEBAPI with password WEBAPI, assigned super permissions to the WEBAPI user including access to the Web API in all modules that I could. I also enabled allow Admin to log in via the web.config (There's another file in the root which I allowed Admin, can't remember the name now) restarted IIS, rebooted the server still not working. I entered the username/password in combinations of upper and lower case. (I think it has to be uppercase) I then assigned permissions to the main installation directory of Sage300 (C:\Sage300) I added my account, Administrator and everyone with full read/write/modify permissions. I also tried to change the user in IIS to administrator and it also didn't work. The exact error from the C:\Sage300\Online\WebApi\Logs trace.log file is ---------------------------------------- Timestamp: 4/27/2019 6:14:14 PM Message: Error-[Tenant:] [Company:] [Module:] [User:] - Sage 300 Web API encountered an error for Url 'localhost/.../ICLocations'.: Exception Source: Exception Type: System.UnauthorizedAccessException Exception Message: Attempted to perform an unauthorized operation. ---- Stack Trace ---- Machine Name: TESTENV01 If I visit the endpoint http://localhost/Sage300WebApi/v1.0/-/SAMINC/IC/ICItems in a browser, after entering the username and password U:WEBAPI P:WEBAPI or ADMIN:ADMIN I get the below response. { "error": { "code": "Unauthorized", "message": { "lang": "en-US", "value": "Authentication error from invalid credentials." } } } FYI I made sure the WEBAPI user was created SAMINC and not SAMLTD which is the default company when "Trying" from the Swagger UI There isn't much info out on google about this issue and I only run into unanswered threads , I'm out of Ideas.
↧
Forum Post: Sage 300 WebAPi Authentication not working
↧
Forum Post: RE: Sage 300 WebAPi Authentication not working
I found the problem. Like usual I struggle for days then I decide to ask online, fiddle a little while waiting for replies and then I find the issue! The solution make no sense to me but anyway here goes... In Eventviewer --> System, there was a DNS warning. SAMINC could not be found and later SAMLTD could not be found as well. So I altered the hosts file to point request made for hostnames SAMINC and SAMLTD to 127.0.0.1 Like this. C:\Windows\System32\drivers\etc # Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost 127.0.0.1 samltd 127.0.0.1 saminc Then suddenly it all started working.
↧
↧
Forum Post: Data dictionary / Querying Sage 300 with PHP
Hi, all. I'm trying to create a couple of simple PHP pages to display some info from CRE 300, using the 32-bit Timberline ODBC driver (not MS SQL). The ODBC connection works for MS Access and Excel, and I can establish a connection using PHP, but I'm not able to query the tables using PHP. I think my problem may just be that I don't have the table names correct, and in spite of seeing several posts that say the data dictionary is available in the Knowledge Base, I've not found it yet. For example, in MS Access, I see a table name of APM_MASTER__VENDOR. If I display the tables using the PHP odbc_tables() function, I see a table name of MASTER_APM_VENDOR. A "select *" from either of these yields a "SQL error: [Simba][SimbaEngine ODBC Driver][DRM File Library]No such table or object." error. I've also seen mention that one can go into Report Designer and get a list of all of the available fields, which will come in handy later, but that still doesn't help with the problem of not knowing what the tables are called. Any help would be most appreciated.
↧
Forum Post: RE: Data dictionary / Querying Sage 300 with PHP
Wrong forum. This is for Sage 300 ERP.
↧
Forum Post: RE: Print to Email Issue
Does anyone found the issue and solution for this type of case?
↧
↧
Forum Post: RE: How to know who posted a bank rec in the Bank module?
Hi Derek, I am using Sage300 not Sage300 CRE. Best, Helen
↧
Forum Post: RE: How to know who posted a bank rec in the Bank module?
BKTRANH.AUDTUSER
↧
Forum Post: Decimal problems
Hello, I need help on a decimal question. Sometimes, we pay US invoices in HK dollars because that is the way our vendors want it. Here is my problem: The real cheque payment is HKD7,997,6125.02 . I tried to use USD0.001, USD 0.002 and exchange rate 7.8409999 for adjustment but all of it would not be made 2 decimal places in final. Adjust -USD0.001 ---> Cheque amount is HKD7,997,615.028 Adjust -USD0.002 ---> Cheque amount is HKD7,997,615.021 Use Exchange rare 7.8409999 ---> Cheque amount is HKD7,997,614.934 Use Exchange rare 7.8409999 + Adjust USD0.11 ---> Cheque amount is HKD7,997615.021 Use Exchange rare 7.8409999 + Adjust USD0.10 ---> Cheque amount is HKD7,997615.013 If we ignore the problem of 3 decimal places in cheque amount, it would be incurred a difference in bank balance between bank statement and sage record.
↧
Forum Post: RE: How to know who posted a bank rec in the Bank module?
Thanks Jay! I tried it and it works!
↧
↧
Forum Post: Exchange rate decimals
Hello, Where do I increase or decrease the number of decimals in the exchange rate in AP or AR? Thank you,
↧
Forum Post: Error Number :[ 52]
Hi All, I recently upgrade Sage 300 to Version 2018. However, the Business which works before the upgrade is now a giving this error. Any ideas on how to resolve. Let me know.
↧
Forum Post: RE: Error Number :[ 52]
It looks like it could be a problem with the template file name. Instructions on how to correct here: http://kb.sageintelligence.com/index.php?title=Unable_to_copy_or_paste_reports_in_Report_Manager_Error_52 Other than that, a quick google search also indicated some people resolved this issue by reinstalling.
↧
Comment on The F1 Key
It is safe to say that you are exploiting the line of keys over the highest point of the console that are known as capacity keys? They are the ones named F1 through F12. They give an assortment of hotkey Help With Assignment Writing - Assignmentspot alternate routes in various Windows applications yet numerous individuals give them sparse consideration
↧
↧
Forum Post: Sage 300 2018 Error on export button
Custom report developed for AR invoices . User enters parameters and executes reports and all the data comes on print preview , approx 15 pages . As soon they click on export button the following error is received. generally user tends to run the report and export to excel data only for further analysis. sage 300 premium 2018 with PU3, SQL 2017 and Server 2016. Clients use sage using workstation setup. Sage Workstation Setup installed again once but didn't fix issue. appreciate fixes for this.
↧
Forum Post: RE: Exchange rate decimals
You can't. They are 7dp. Is that not enough? Also if you don't want to go to 7dp then you don't have to. Just round it to whatever you want.
↧
Forum Post: RE: Exchange rate decimals
Hi Steve, Thank you for your reply. Here is the problem: The real cheque payment is HKD7,997,6125.02 . I tried to use USD0.001, USD 0.002 and exchange rate 7.8409999 for adjustment but all of it would not be made 2 decimal places in final. Adjust -USD0.001 ---> Cheque amount is HKD7,997,615.028 Adjust -USD0.002 ---> Cheque amount is HKD7,997,615.021 Use Exchange rare 7.8409999 ---> Cheque amount is HKD7,997,614.934 Use Exchange rare 7.8409999 + Adjust USD0.11 ---> Cheque amount is HKD7,997615.021 Use Exchange rare 7.8409999 + Adjust USD0.10 ---> Cheque amount is HKD7,997615.013 If we ignore the problem of 3 decimal places in cheque amount, it would be incurred a difference in bank balance between bank statement and sage record. Thank you
↧
Forum Post: RE: Exchange rate decimals
Just type over the final HKD amount. Don't try to get the math on the rate*source to work, because you can't.
↧
↧
Forum Post: RE: Exchange rate decimals
Hi Jay, Thank you for your answer. I didn't know we could type the HKD amount? So if my Vendor amount is 1019 973.858 USD, you mean I can enter Payment Amount? If you look at the screen shot below, it is grey out the Payment Amount:
↧
Forum Post: RE: Exchange rate decimals
Oh, right, then never mind. Look, this is why "exchange rounding error" accounts were invented. You can't make it perfect, but it's not material, so just right off the damn pennies at the end of the month.
↧
Forum Post: RE: Exchange rate decimals
LOL I think you are right :) Tx!
↧