When pulling a saved search object into SDF are we...
# suitescript
m
When pulling a saved search object into SDF are we able to decode the definition into a readable definition?
b
Yes, but it looks super weird, not sure how useful that is. Use this tool I built (I haven't released it): https://ursuscode.com/tools/SavedSearchXMLDecoder.html Paste the encoded string found in the definition and click decode.
m
Somebody pointed me to Salto in the #C42JX79UZ channel and I went to their repository and converted their JS conversion into bash commands if this helps I tested and it works.
Copy code
xml2json customsearch_mycustom_search_id.xml | jq ".definition" | awk -F'@' '{print $NF}' | base64 -d | gunzip | xml2json > customsearch_mycustom_search_id.json
f
Just use the chrome browser extension. I'd advocate against using saved searches in your scripts.
m
It was mostly a question of curiosity than anything else. I don't know that I will be utilizing it other than maybe looking back through git history for what a search looked like previously.
🙌 1