how to get any BO data value in custom javascript/render
-
- Posts: 370
- Joined: Sat Apr 28, 2018 3:33 am
- Location: India
- Contact:
how to get any BO data value in custom javascript/render
how to get any BO data value in custom javascript/render? I can only get <<LoggedInUser.>> or <<SystemSettings.>> values in my js or render script. If I have BO called mycustomBO I need to get one item Find mycustomBO where ID=23 and then get its mycustomBO.Column2 value in js or render script.
Re: how to get any BO data value in custom javascript/render
Only way I know to do this would be have a proc saying
FIND mycustomBO WHERE (mycustonBO.ID='23')
INSERT mycustomBO IN LoggedInRegularUser.ps_mycustomBO
then <<LoggedInRegularUser.ps_mycustomBO.Column2>>
If you have the object in context there might be some way, but I haven't found it.. It will be interesting to follow this thread
FIND mycustomBO WHERE (mycustonBO.ID='23')
INSERT mycustomBO IN LoggedInRegularUser.ps_mycustomBO
then <<LoggedInRegularUser.ps_mycustomBO.Column2>>
If you have the object in context there might be some way, but I haven't found it.. It will be interesting to follow this thread
-
- Posts: 370
- Joined: Sat Apr 28, 2018 3:33 am
- Location: India
- Contact:
Re: how to get any BO data value in custom javascript/render
When I use this in menu render js it says value is not defined- value is test or the actual value in the column and then it says
testvalue is not defined or testvalue1 is not...
in render-
<<LoggedInSystemUser.Column2>>
testvalue is not defined or testvalue1 is not...
in render-
<<LoggedInSystemUser.Column2>>
Re: how to get any BO data value in custom javascript/render
I'm not familiar with custom javascript/render, but is it possible in your scenario to have a process which find the BO.attribute info you need to use and place it in a LoggedInRegularUser.attribute?
Tom - V8.8 build 3137 - MySql / PostGres
-
- Posts: 370
- Joined: Sat Apr 28, 2018 3:33 am
- Location: India
- Contact:
Re: how to get any BO data value in custom javascript/render
Thanks for this suggestion. I have the data like what you explained but I need that data as decision maker at render and then do something at render in js. I can access this object but never saw any sample <<BO.columndata>> in render or js. I could access it in html.
Re: how to get any BO data value in custom javascript/render
this is in a Grid, correct?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 7572
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: how to get any BO data value in custom javascript/render
If you want to get a value of an attribute of a business object from the SERVER in your custom Javascript you can so this:
var action = new AwareApp_GetAttributeValueAction (objectName, objectId, attributeName, null, null, function (value) {
/** Do something with the received value */
});
action.run ();
Check out the code of this action in postFormData.js
var action = new AwareApp_GetAttributeValueAction (objectName, objectId, attributeName, null, null, function (value) {
/** Do something with the received value */
});
action.run ();
Check out the code of this action in postFormData.js
Aware IM Support Team
-
- Posts: 370
- Joined: Sat Apr 28, 2018 3:33 am
- Location: India
- Contact:
Re: how to get any BO data value in custom javascript/render
This works just fine. Thank you.aware_support wrote:If you want to get a value of an attribute of a business object from the SERVER in your custom Javascript you can so this:
var action = new AwareApp_GetAttributeValueAction (objectName, objectId, attributeName, null, null, function (value) {
/** Do something with the received value */
});
action.run ();
Check out the code of this action in postFormData.js