Service Help – EntryFormSimpleUpdate
The Sharperlight service offers a wide variety of presentation methods, each with its own set of parameters.
In this post, we will introduce the following method from among the various presentation methods available.
http://abcd.com/mdService1Rest/EntryFormSimpleUpdate/…
{sharperlight service url}/Help#EntryFormSimpleUpdate
|
Simular to EntryFormPost but all the writeback details are passed on the url GET instead of using POST
The user session id is not required if the user has already signed on and a cookie session is active
http://sharperlight-my/mdService1Rest/EntryFormSimpleUpdate/?productcode=ADVW&tablecode=PurVen&editkey=ALLENSON0001&ipf1=ALLENSON0001&ipf2=Allenson+Cycles&ipf3=2&ipf4=1&ipf5=1&ipf6=&ipf7=2001-05-26&response=json&usid=547aa69154c64308b275279c9994850eZ This example updates the System Property called code’s and updates it’s value of the Type Text
http://sharperlight-my/mdService1Rest/EntryFormSimpleUpdate/?productcode=System&tablecode=PropSys&ipf0=code&ipf1=Text&ipf2=Test%20Value&response=json Normally the status is returned as text but you can get back the status in JSON format When Inserting data with identities the recordId will be the new identity value STATUS DEFAULT { “message”:”” ,”recordsAffected”:1 ,”recordId”:-1 ,”statusCount”:0 ,”errorMessage”:”” ,”status”: [ { “field”:””,”message”:””} ] } STATUS JSON { “message”:”” ,”recordsAffected”:1 ,”recordId”:-1 ,”statusCount”:0 ,”errorMessage”:”” ,”status”: [ { “field”:””,”message”:””} ] } |
|
| productcode=[product] | DataModel Product Code e.g. productcode=ADVW |
| supercode=[value] | If the Product has a super field (optional) that is filtered before the Tables, then set it here. e.g. supercode=CompanyID |
| tablecode=[tableCode] | DataModel Product Table Code e.g. tablecode=ProLoc |
| editid=[idnum] |
The record id. This would be the unique identify value of the Table Record if one existed
e.g. ?productcode=ADVW&tablecode=ProLoc&editid=2&response=json |
| editkey=[uniqueKey] |
The record unique key. The table can only have one unique field as multiple unique fields are not supported. (Note this is not an identity) e.g. ?productcode=ADVW&tablecode=PurVen&editkey=ALLENSON0001&response=json |
| ipf0=[value] | First Field’s value. format: dates as yyyy-mm-dd HH:mm:ss boolean as 0 or 1 and Values list should be set to their code or description |
| ipf#=[value] | The (n)th Field’s value. |
| ipc:(code)=[value] | Set the value of the Field by it’s unique code path (Use the System Datamodel Writeback Metadata Table to get codes) e.g. &ipc:\CompanyName=ABC%20Software |
| usid=[sessionid] | User Session ID |
| uniqueID=[uniqueHash] | To prevent data being cached create unique value say on date time or something e.g. uniqueID=D5H16M43S0D |
| response=[json|jsonp] |
When left blank the status response will be { “message”: ……} When set to json it will be { message: ……} When set to jsonp it will be unless you set callback Callback( { message: ……} ); |
| callback=[MyFunc] | JSON Callback function (Optional) &callback=MyFunc results in MyFunc( { “message”: ……} ); |
| statusOK=[message] |
Specifiy the successful update message returned. Normally this is blank (null)
You can reference the number of records affected by {recordsAffected} e.g. &statusOK=Updated {recordsAffected} |
| statusError=[message] |
Specifiy the error message returned. Normally this is Error: xxxx
To suppress error messages use &statusError=none You can reference the error message by using {errorMessage} e.g. &statusError=Try agian {errorMessage} |
| redirect=[url] |
If the update is successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is always encoded as FromBase64String then zip memory compressed |
| redirectBase64=[url] |
If the update is successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is always encoded as FromBase64String |
| redirectSimple=[url] |
If the update is successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is not encoded except for the url char protection e.g space is %20 etc |
| redirectError=[url] |
If the update is not successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is always encoded as FromBase64String then zip memory compressed |
| redirectErrorBase64=[url] |
If the update is not successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is always encoded as FromBase64String |
| redirectErrorSimple=[url] |
If the update is not successful, redirected to this url address. (only valid if response is not set to json or jsonp)
The url is not encoded except for the url char protection e.g space is %20 etc |
