Forum Discussion
Without image the question is a little bit hard to understand
But maybe you could use a "onAfterNew" Client Event in your ItemType. E.g. check out Method 'PE_SetOriginator". This one is used very often to set the owner property automatically.
- hkhan4 years agoCreator II
So im trying the following added code on the property itself, oneditfinish event and i will get the following error[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:51e5b6c0-f8dd-4c91-a76d-0800bbabd927:type=text&text=%20var%20SDRLMDID%20%3D%20document.thisItem.getProperty%28%22vsy_did_master%22%2C%22%22%29%3B%20%0D%0A%20var%20SDID%20%3D%20this.getInnovator%28%29.getItemById%28%22Supplier%20DID%22%2C%20SDRLMDID%29%3B%0D%0A%20if%20%28SDID.getItemCount%28%29%3D%3D1%29%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20this.setProperty%28%22vsy_first_delivery%22%2C%20SDID.getAttribute%28%22id%22%29%29%3B%0D%0A%20%20%20%20%20%20this.setPropertyAttribute%28%22vsy_first_delivery%22%2C%20%22keyed_name%22%2C%20SDID.getProperty%28%22keyed_name%22%2C%20%22%22%29%29%3B%0D%0A%20%20%20%20%7D]
- angela4 years agoCatalyst II
You cannot use document.thisItem outside the context of a Form. Better try "this". Or take a look at "PE_SetTeam" which is maybe the better sample in your case.
Otherwise show screenshots of the situation cause I really don´t know what you try to do ;-)
Edit: My sample Methods where intended as onAfterNew "Client Events" not as property events. So beware!
- hkhan4 years agoCreator II
okay so ill rephrase the issue again:
There are two items Master DID and SDRL
Both these item contains a property called first_delivery which is a string data type.
Supplier DID has a property called master_did which is an item property links to Master DID item.
There is a third item called subcontract, when the user creates a new SDRL from the relationship in subcontract item and select master_did I want first_delivery to be populated instantly from Master DID before saving.
Please not: it cannot be foreign property as it should be editable
Following are the screen shots.