I want to create a custom app that can only be used in my company(use on freshdesk), not for market.
I had filled in the information to the “app information” and “media and installation”
After clicking “save and publish”
The system shows successfully uploaded
but when I checked “View activities”, the system rejected.
And in freskdesk’ custom App page is shown nothing too.
the zip file is here.
hide_root_cause_app_v6.zip (1.7 KB)
App.js
// Hide Root Cause Fields App
const client = window.FreshworksSDK;
// App activation and field change listeners
client.events.on('app.activated', toggleRootCauses);
client.events.on('ticket.field.changed', event => {
if (event.fieldId === 'cf_qty_of_failures') {
toggleRootCauses();
}
});
function toggleRootCauses() {
client.instance.get('cf_qty_of_failures')
.then(res => {
const qty = res.value;
const fields = [
'cf_root_cause_1_v2',
'cf_root_cause_2_v2',
'cf_root_cause_3_v2',
'cf_root_cause_4_v2'
];
if (!qty) {
fields.forEach(id => client.interface.trigger('hide', { id }));
} else {
fields.forEach(id => client.interface.trigger('show', { id }));
}
});
}
manifest.json:
{
"platform-version": "2.3",
"product": {
"freshdesk": {
"location": {
"ticket_sidebar": {
"url": "index.html"
}
}
}
},
"engines": {
"node": "18.17.1",
"fdk": "9.0.4"
},
"id": "hide-root-cause-fields",
"version": "1.0.6",
"title": "Hide Root Cause Fields",
"author": "Generated by ChatGPT",
"description": "Hide root cause V2 fields when qty_of_failures is blank",
"private": true
}