I am trying to mimic the behavior of the work orde...
# suitescript
n
I am trying to mimic the behavior of the work order creation from the sales order. I passed the url creation with parameters however I can't find a way to use "linkText" for only one link... I don't want to see the complete URL but only a linkText. Does someone knows how to do it? (I created a custom column in the item sublist with hyperlink type). LinkText seems to work only on the "form", not on the "setsublistvalue". Thank you 🙂
r
did you use the LinkText option at field level?
n
Yes, but it is a sublist, so the field is the whole column for LinkText 😕
a
I have used this recently and seems to work. see example below
var dpidurl = updatedSublist.addField({ id: 'dpidurl', type: serverWidget.FieldType.URL, label: 'View Demand Plan' }); dpidurl.linkText = 'Edit';
n
Hi Ankur, this works for the whole column. What I want to do is to mimic the "createpo" or "createwo" behavior. That means having a link to create and another link when it exists in the same column.
a
ah... not sure if it's possible to change the link text dynamically... you could have 2 columns i guess. not elegant but may be works
n
Hi Ankur, you are right, that is what I did, but the inherent solution is very good. Maybe there is a specific way to do it. Thanks.