I create a product of type abcroduct with a product Id - 12345 (for example) in the abcroductId field.
I have a type called abcroductContent with the abcroductNumber field. Now when I'm creating the document of type abcroductContent, I'm trying to populate the abcroductNumber field with the value of the above mentioned product Id of abcroduct object (and make the field read only).
Are you creating new content OR uploading new content ? I mean have you customized the alfresco share upload dialog ? OR you have created a new content (under Create button) ?
I've created a form in share-config-custom.xml for abcroductContent and abcroduct. I've a dashlet which shows the details (properties) of the abcroduct object. In that dashlet I've a "Create Product Content" button. When I click on it, it is forwarded to create-content?destination=some-folder-path&itemId=abcroductContent. Here in this create content page I would like to populate abcroductNumber field with the value of productId value shown in the dashlet. Is this possible to achieve?
Yes. You can override share-form-config.xml, put your custom field (abcroductNumber) here. And make it non-editable (can be by read-only="true"). Secondly, passing your productNo. can be done by appending it in url (create-content?destination=some-folder-path&itemId=abcroductContent&productNumber=123) and then set the value in the field. Have a look at create-content-mgr.js (tomcat\webapps\share\components\create-content\create-content-mgr.js) where you can get the value from the url.