PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → SaaS information
SaaS information
Iniciado por Lucynda, dez., 27 2017 9:31 PM - Sem resposta
Publicado em dezembro, 27 2017 - 9:31 PM
Hello,
I created a simple dynamic site for two sets of groups to login to a web portal that shows their data by date range. I now have to convert it into a SaaS site(for deployment reasons) and try to keep the design the same. We would prefer to have a customize login page but I can't figure out the code to include. This article I am trying to follow:
https://doc.pcsoft.fr/en-US/?9500214&name=developing_saas_site

This is a very helpful article but I'm stuck on the "Call SaaSConnect to establish the connection to the SaaS Webservice" I've been using the My_first_pages tutorial project until I feel comfortable enough with these instructions to apply on my actual project.
Below is the code from My_first_pages and the suggested code from the link above, if someone knows how to put it together it would be great!

//Regular login in code
HReadSeekFirst(Registration,Login,EDT_Login)
IF NOT HFound(Registration) THEN
Error("Login not found.")
ELSE
IF EDT_Password = Registration.Password THEN
PageDisplay(PAGE_Loops)

ELSE
Error("Wrong password.")
END
END

//Code from article above
// Connection to the Webservice in charge of the site
IF SaaSConnect(EDT_LOGIN, EDT_PASSWORD) = False THEN
IF ErrorOccurred = True THEN
sErrorMessage = CR + ErrorInfo(errFullDetails)
RESULT sErrorMessage
ELSE
RESULT "Connection to SaaS site denied."
END
END

// Pass a specific syntax (without parameter) to specify that we are checking the access to the site
// The client has at least one valid subscription to at least one service of the site
IF SaaSCheckService() = False THEN
IF ErrorOccurred = True THEN
sErrorMessage = CR + ErrorInfo(errFullDetails)
RESULT sErrorMessage
ELSE
RESULT "Connection to the SaaS service of the site denied."
END
END

// Use the connection to the HFSQL Client/Server or Classic database
// defined in the SaaS administrator on the server, for the site data.
IF HChangeConnection("*", SaaSClientConnection()) = False THEN
sErrorMessage = HErrorInfo(hErrFullDetails)
RESULT sErrorMessage
END

RESULT "Connection OK"