2.3.difference behaviour b/w platform and in portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:40 PM
Hi Team ,
There is a difference behavior between Portal and Platform ends.
We have catalog called Lost or Stolen Device. Based on device type, a Short description is populating .
For example, if I choose device type is 'Laptop' >> In short description field, it is populating like this, i.e. [ Lost/Stolen Laptop Report] [By requestor for name ]
For this, i have written client script.
function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } var deviceTypeValue = g_form.getValue('device_type'); g_form.getReference('requested_for', function(requestedForRecord) { var requestedForValue = requestedForRecord.name; g_form.setValue('short_description_1', "Lost/Stolen " + deviceTypeValue + ' ' + " Reported By " + requestedForValue); }); }
Now , the problem I am facing is that this is working fine in portal, but when we are checking from the platform , it is not working .
If you could see in the below screenshot ,from the portal and platform in the short description field, Device Type backend name is showing instead of label .
Portal View
Platform view
The Result should come like this
In both Platform and in portal .
can anyone please help me here , what changes should i need to do in my script .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:51 PM
Hi @nameisnani
Can you check by using g_form.getDisplayValue('device_type'), instead of g_form.getValue('device_type');
If this information helps you, kindly mark it as Helpful.
Regards,
Najmuddin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 10:06 PM
function onChange(control, oldValue, newValue, isLoading) { if (isLoading || newValue == '') { return; } /* getValue to getDisplayValue */ var deviceTypeValue = g_form.getDisplayValue('device_type'); g_form.getReference('requested_for', function(requestedForRecord) { var requestedForValue = requestedForRecord.name; g_form.setValue('short_description_1', "Lost/Stolen " + deviceTypeValue + ' ' + " Reported By " + requestedForValue); }); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:27 AM
Hi @nameisnani ,
Did the new updated script work ?
Regards,
Najmuddin.