Hi David,
The deprecated method for converting html text into plain text still works in higher version.
outbound-object-structure-integration.html
Option A: You can refer above link and create an outbound object structure processing script.
------------------------------------------------------------------
from psdi.util import HTML
def overrideValues (ctx):
if ctx.getMboName() == "PO" :
ctx.overrideCol("DESCRIPTION_LONGDESCRIPTION", HTML.toPlainText(ctx.getMbo().getString("DESCRIPTION_LONGDESCRIPTION")))
--------------------------------------------------------------------------
or Option B: Use python functions to remove the special characters
----------------------------------------------------------------------------------------------------------------------------
import re
def removeHtmltags(text):
clean = re.compile('<.*?>')
return re.sub(clean,'', text)
def overrideValues (ctx):
if ctx.getMboName() == "PO" :
ctx.overrideCol("DESCRIPTION_LONGDESCRIPTION", removeHtmltags(ctx.getMbo().getString("DESCRIPTION_LONGDESCRIPTION")))
-------------------------------------------------------------------------------------------------------------------------------
Thanks,
Suren
------------------------------
Surendar Balasundaram
------------------------------
Original Message:
Sent: Wed March 27, 2024 05:20 PM
From: David Miller
Subject: Special Characters in Descriptions breaking Integrations?
Problem is all this stuff on that class appears to be Deprecated. What do they want us to use when they deprecated what use to work?
Maximo 7.6 API - RichText (bportaluri.com)
------------------------------
David Miller
Managing Partner - Maximo Consultant
Enterprise Integration Partners LLC
------------------------------
Original Message:
Sent: Wed March 27, 2024 07:37 AM
From: Mark Robbins
Subject: Special Characters in Descriptions breaking Integrations?
Hi David.
The psdi.util.HTML class in the posting does reference a Java class that some interface specific code can call.
I doubt that there will be a specific attribute level class that you can use because the problem could hit multiple bits of Maximo so they won't each have a specialist function to clean up the text. Having a special attribute class would also prevent other customisations being executed when the value is modified.
It sounds like a problem where the value was converted into a symbol - possibly using one of the Microsoft Word smart typing conversions. Those conversions take strings like (c) and translate them into the Copyright symbol.
------------------------------
Mark Robbins
Support Lead/Technical Design Authority / IBM Champion 2017 - 2023
Cohesive (previously Vetasi Limited)
https://www.linkedin.com/pulse/maximo-support-advice-from-non-ibm-engineer-article-mark-robbins/