- 8.6KViews0likes7Comments
Disable a Relationship Tab
I added a relationship to Part Item Type and I tried to disable the relationship tab in certain condition( the condition is not added to the code yet) . Relationship name ="a_Cost Data", label =" Cost Data", I am not sure which one I should use for GetTsbId(?) , tried both of them, neither works, the Cost Data tab is still enable. The action of the method is added to the Part Form Event , Event = onLoad Please advice Thanks if (parent.relationships.relTabbar !==null){ clearInterval(interval); disableTab(); } function disableTab() { var showTab = false; var tabbar = parent.relationships.relTabbar; var tabID =tabbar.GetTsbID(" a_Cost Data"); //var tabID =tabbar.GetTsbID("Cost Data"); if (!tabID){ aras.AlertError("Cannot access Tab") } else { tabbar.setTabEnabled(tabid,showTab); } return; } Also I like to know if there is any documentation for all the Form related functions and use cases, I couldn't find at ARAS Programming Guide or ARAS API references8.6KViews0likes5CommentsHow to Set RelationShip field value result as onFormPopulated ?
I have a itemtype call 'Part' , Part has a field call 'part price' (type is decimal) Part has a relationship call Part_detail Part_detail has a field call 'RP price' (type is int). I need "part price" to have thousand separator, but it is only for displayed, and does not need to be in the database after save so I use onFormPopulated event to set code as : document.getElementsByClassName('part_price')[0].value = originalValue.replace( RegExp, '$1,'$2'); It is work ! but I need "RP price" to have thousand separator ,too ! It is relationship and has no onFormPopulated event to code What should I do to have the same effect as "part price" (thousand separator just for show , not need to save in database )? and where I can edit relationship DOM ?7.8KViews0likes5CommentsHow to fetch file object of vaulted File with JS so we can later read the file content?
Hi community, does anybody a way to read the file content of existing Files in the Vault (mainly xml data) with Javascript? For example we have an CAD item with an xml file in the property native_file. With an button click I want to read the filecontent and stream the result to another system. (I know that the xml files are not the typical content of the CAD ItemType, I just abuse this ItemType for my current test :-) ). I know that we can use fetchFileProperty to download files to the client. In addition there seems to be an additional 3rd parameter where we can define if we really want to download the file (Standard Mode), or only get the File item (Dry Mode). But none of these two modes will return the native FileObject needed for the FileReader. I tried the following code from a regular Form button: var fileObject = document.thisItem.fetchFileProperty("native_file", "C:\\Temp", 1); This variant will return the file item. Is there any way to get the file object itself with JS? Another possible solution would be to use C# for this task. This way we could download the file temporary to the server and then ready the file content there. But maybe it´s possible to avoid this additional download? Thanks for any help!7.4KViews0likes4CommentsDisable Add relationship
Hi all, I should disable the ability to create a new relationship when an Item is in a certain state. For example: I have an Item Document with an relation to Item File. When the user create a new document (state document = New) he can create a new relationship with an Item File. If the Document is promoted to another state (Check) the user can only modified the property of Document but he can't modify a relationship (add, remove, edit). I found more example to hide a Tab Relationship, but i want to show this tab in Readonly mode. Thanks6.8KViews0likes4CommentsDisable more than one text field on the form
Hi Community, I am using a code from the "Disable Form Fields"-blog (https://community.aras.com/b/english/posts/disable-form-fields/) in one of my methods. In the test phase I realized that the code for the text field only works on one field. I tried to call all the required fields in the brackets, but it always used only one field: var input = getFieldByName("part", "part_number", "quantity"); input.getElementsByTagName("input")[0].disabled = true; How can I easily disable multiple fields at the same time on the form? Thank you in advance for your help! Best regards David6.4KViews0likes4CommentsCallback not working properly if I dont have debugger in my javascript code
I have added a popup on button click on the mpp_OperationQuickEdit Form which opens form with a single relationship which I have created.It works like the 'Launch AML Editor' action on MCOs.I have added a save changes button which adds or remove relationships based on relationship added or removed.Then a callback function is provided.the relationships are added or removed successfully but the problem is that the callback works fine if I have put debugger in my javascript code otherwise it just closes both the forms the new popup and the quickEdit form.What could be the problem?6.3KViews1like12Comments