Event Handler Failed OnInsertRow
Hi I am new to Aras so i dont really know what am doing. However i have been working on a small project where i require a row event. when i add the below code to the Relationship type with the event handler OnInsertRow i keep getting an error. can someone please help me i dont know what am doing wrong. var parent_item = parent.thisItem; var parts = parent_item.getRelationships("parts"); var newItemNum = parts.getItemCount(); setRelationshipProperty(relationshipID, "sort_order", newItemNum); Thank you9.9KViews0likes4Comments- 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.8KViews0likes4CommentsIs it possible to use the change event trigger of an item to get the name of the field?
hi All, According to this image, my method name is " change_field ". The field names of text boxes framed by dashed lines on the screen are "A", "B", "C", and "D". The text boxes that are framed with dashed lines have a text box below them that is not framed with dashed lines. The field names are "A1", "B1", "C1", and "D1" respectively. I want to get the field name of the current trigger method in the method "change_field", and change the value of other text boxes according to the field name. Example: The user changes the text box with the field name "A" and triggers the method "change_field". I need to get the field name of the current text box called "A" in the method "change_field" and read the field name of the current text box called "A" to change the value of the field name of the text box called "A1". But I don't know how to write the syntax of 「get the field name of the current text box as "A"」 If somebody knows and can help I would really appreciate that. Thank you.6.8KViews0likes6Comments