TACTIC Open Source
how to use python api change stype images? - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: how to use python api change stype images? (/showthread.php?tid=168)



how to use python api change stype images? - EricTsuei - 08-27-2020

I can use python API to create, upload, modify sobjects. but how to change sobject's images?


RE: how to use python api change stype images? - remkonoteboom - 08-28-2020

Do you mean the preview image that you see on table or tile layout? You have to check-in a file with the special context "icon". Whatever is latest that is checked-in to that context will appear as the preview. If there is no "icon" checkin, it will use the latest snapshot and look for a file of type "icon" in that snapshot.


RE: how to use python api change stype images? - EricTsuei - 08-31-2020

(08-28-2020, 02:51 PM)remkonoteboom Wrote: Do you mean the preview image that you see on table or tile layout?  You have to check-in a file with the special context "icon".  Whatever is latest that is checked-in to that context will appear as the preview.  If there is no "icon" checkin, it will use the latest snapshot and look for a file of type "icon" in that snapshot.

I am sorry, but I mean use python code to update the preview image.


RE: how to use python api change stype images? - listy - 08-31-2020

(08-31-2020, 01:58 AM)EricTsuei Wrote:
(08-28-2020, 02:51 PM)remkonoteboom Wrote: Do you mean the preview image that you see on table or tile layout?  You have to check-in a file with the special context "icon".  Whatever is latest that is checked-in to that context will appear as the preview.  If there is no "icon" checkin, it will use the latest snapshot and look for a file of type "icon" in that snapshot.

I am sorry, but I mean use python code to update the preview image.

For example, if you use python api to upload images to particular sobject, changing the preview would look like:
Code:
skey = 'SOBJECT SKEY'
context = 'icon'
file_path = 'c:/file.jpg'
server.simple_checkin(skey, context, file_path)