SData Install & Training

SUGGESTED

Has anyone here successfully installed SData and created an application that uses SData to write information into Sage 100 2013 (version 5.0) files?

I could not find any SData training on Sage University and I have found very few examples on the internet.  I did find one example on Chortek Technology Blog: http://blog.c-gconsulting.com/2013/04/sdata-with-sage-100-erp-2013.html

However, I'm unable to get the basic test URL to work: http://localhost/sdata/masapp/MasContract/ABX/$schema
I receive an error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Any help or guidance is greatly appreciated.

Thanks,
Danny


 


 

  • 0

    Search for DFeller aka Dawn on here. She has done work with SData and should be able to assist.

  • 0 in reply to BigLouie

    Thanks Big Louie.  I'll reach out to Dawn.

    SData seems really cool, but not much info. yet.

  • 0 in reply to DannyB

    My understanding is that SData is read-only, you can't write data into the Sage 100 tables with it.  You have to use the BOI to write data.

  • 0 in reply to hyanaga

    I just started experimenting with SData last week and have not yet tried to write back to Sage 100, but on the SData Security tab in Role Maintenance the tables are divided up into two categories; Business Tables and Read-Only Tables. The Business Tables have CRUD permission assignments which leads me to believe that they are not read only. Am I mistaken with this assumption?

  • 0 in reply to W Jezewski
    SUGGESTED

    sData for Sage 100 ERP is read-only. Don't waste your time if that is what you need to do.

  • 0 in reply to mwilliams@nchannel

    Greetings,

    I did a demo at Sage Summit in 2013 showing how to create Customers and Sales Order using the Sage 100 ERP SData Native Provider Adapter.  The full demo code and other information was made available to those that attended my session.  

    Just to give you some insight on how to do this, here is a partial sample of the code for creating a customer, please note that this is Demo code, not production code and forgive the poor formatting.

    newCustomer.html:

    function submitNewCustomer() {

    var dropBoxElement = document.getElementById('divisionSelected');

    var ardivisionno = dropBoxElement.options[dropBoxElement.selectedIndex].value;

    var customerno = document.getElementById('customerno').value;

    dropBoxElement = document.getElementById('salespersonSelected');

    var salespersonkeystring = dropBoxElement.options[dropBoxElement.selectedIndex].value;

    salespersonkey = salespersonkeystring.split(";");

    var aUrl = '/sdata/MasApp/MasContract/' + gCompany + '/AR_Customer(\'' + ardivisionno + ';' + customerno + '\')';

    var aPayload = '<AR_Customer sdata:uri="' + aUrl + '" xmlns="">';

    aPayload += '<ARDivisionNo>' + ardivisionno + '</ARDivisionNo>';

    aPayload += '<CustomerNo>' + customerno + '</CustomerNo>';

    aPayload += '<SalespersonDivisionNo>' + ardivisionno + '</SalespersonDivisionNo>';

    aPayload += '<SalespersonNo>' + salespersonkey[1] + '</SalespersonNo>';

    aPayload += '</AR_Customer>';

    sdataPost(

    aUrl,

    aPayload,

    'AR_Customer'

    );

    }

    sDataRequest.js:

    function sdataPost(urlToPost, myPayload, myResource) {

    var xmlhttp;

    if (window.XMLHttpRequest) {

    // everything but IE

    xmlhttp=new XMLHttpRequest();

    } else {

    // IE

    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

    }

    // event handler for when the xml response returns

    xmlhttp.onreadystatechange=function() {

    statusText(xmlhttp);

    if (xmlhttp.readyState==4) {

    window['change' + myResource]();

    if (xmlhttp.status!=200) {

    //document.getElementById('errorInfo').innerHTML = xmlhttp.status.toString() + xmlhttp.responseText;

    //alert (xmlhttp.responseText);

    popError(xmlhttp);

    } else {

    alert ('Success!');

    window.location.assign("customerlite.html");

    }

    }

    }

    myPayload =

    '<entry xmlns:atom="www.w3.org/.../Atom" ' +

    'xmlns:xs="www.w3.org/.../XMLSchema" ' +

    'xmlns:cf="www.microsoft.com/.../2005" ' +

    'xmlns="www.w3.org/.../Atom" ' +

    'xmlns:sdata="schemas.sage.com/.../1" ' +

    'xmlns:xsi="www.w3.org/.../XMLSchema-instance" ' +

    'xmlns:opensearch="a9.com/.../" ' +

    'xmlns:sync="schemas.sage.com/.../1" ' +

    'xmlns:sme="schemas.sage.com/.../2007" ' +

    'xmlns:http="schemas.sage.com/.../1"> ' +

    '<sdata:payload>' +

    myPayload +

    '</sdata:payload>' +

    '</entry>';

    urlToPut = foolCache(urlToPost);

    xmlhttp.open("POST",urlToPost,true);

    xmlhttp.setRequestHeader("Authorization", "Basic " + Base64Encode(gAuthString));

    xmlhttp.setRequestHeader("Content-Type", "application/atom+xml;type=entry");

    xmlhttp.send(myPayload);

    }

    Thank you,

    Kent Mackall

  • 0 in reply to Kent Mackall

    Kent,

    I downloaded the session: "P-51 - Sage 100 ERP SData and How to Create Web Integrations" PowerPoint (pdf) presentation from the Sage Summit 2013 site, but I didn't see the code samples.

    Is there a site with the code samples posted or can you let me know where I can get the code samples that you presented in the Sage Summit session?

    Thanks,

    Danny

  • 0 in reply to DannyB

    Kent,

    Did you have to do something with the contract to make that work? As far as I can see, all fields in schema are read-only. Is there a new contract out there or something?

  • 0 in reply to mwilliams@nchannel

    Greetings,

    The full demo code was only available to those that attended the SData session at Sage Summit last year.  I need to check if that can be made generally available at this point.

    MWilliams:

    I did not have to change the contract in order to get this to work. I just had to grant permissions in Role Maintenance.

    Thanks,

    Kent

  • 0 in reply to Kent Mackall

    Greetings,

    Just wanted to post a status update:  We have approval to post the SData Demo information and I am working with our PM Team to make this available.  As soon as I have details on where/how it can be downloaded, I will post back.

    Thank you,

    Kent