I need a little help understanding the usage of the servlet API and making changes just to an assets state and assigned owner.
As I understand it you just do a simple POST to https://mydomain.com/servlets/AssetServlet with just the variables you wish to change.
For example a simple html form would be:
- <form action="/servlets/AssetServlet">
- <input type="text" id="assetName" name="assetName"/>
- <input type="text" id="assetState" name="assetState"/>
- <input type="text" id="associateToUser" name="associateToUser"/>
- <input type="text" id="associateToDepartment" name="associateToDepartment"/>
- <input type="hidden" id="operation" name="operation" value="UpdateAsset"/>
- <input type="hidden" id="username" name="username" value="myUsername"/>
- <input type="hidden" id="password" name="password" value="myPassword"/>
- <input type="hidden" id="DOMAIN_NAME" name="DOMAIN_NAME" value="myDomain"/>
- <input type="hidden" id="logonDomainName" name="logonDomainName" value="AD_AUTH"/>
- </form>
What I don't understand is the value for state, assetState, associateToUser, associateToDepartment
Is it the the text value like "In Use" or would it be the RESOURCESTATEID value "2"
And can I select an asset by ServiceTag or WORKSTATIONID or does it have to be assetName
I may be over thinking this but I wanted to ask before I try it.
Also what would be the difference between UpdateAsset and SaveAsset?