- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 12:01 PM
I'm trying to change the text of a label created in customizer.
I'm running this script from within user created button.
I tried:
retVal = oUIObj.SetVar("Test Label", "New Label")
but I get error message: "Variable Type Invalid".
I tried the same for the MAS label "Comment" in Sales Order Header:
retVal = oUIObj.SetVar("Comment", "test") , but instead of changing the text of "Comment" label the value of the Comment textbox was set to "test".
How can I address the name of the label then? Is it even possible?
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 12:58 PM
Have you ever thought of just going into Custom Office and pulling up the panel and editing. I mean it's just a text box on a panel.
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 01:07 PM
Yes, I did, but it's not the case here.
I need to change it dynamically depending on some logic in the script.
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 04:09 PM
You would still go into Customizer to get the name of the object. It probably starts with "ML_"
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2011 05:23 PM
Only some MAS labels are named ML_NAMEOFTHELABEL.
These labels can be changed with:
retVal = oUIObj.SetVar("ML_NAMEOFTHELABEL.", "some text")
It worked for ML_CUSTNAME:
retVal = oUIObj.SetVar("ML_CUSTNAME", "my customer")
Their type is Multi-Line, however other labels and user created labels are Text type. I wish I could somehow change them.
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-17-2011 05:03 AM
Using customizer you can hide the text label. Then create a new ML label that you will populate.
Re: Change label text with oUIObj.Set Var
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-17-2011 11:06 AM
But by adding ML field I would have to add another UDF to the table and this is what I want to avoid, by being able to manipulate the contents of the text label.
I found that the name of my label object is "Fonted_text_5", but I can not change the text it contains in any way.


