NSUserDefinedFieldInfoAgent function Publish only works once from script
I have tried to create some Userdefined fields through crmscripts with the publish function in the NSUserDefinedFieldInfoAgent.
This works once, but when I try to create another field on the same entity does nothing happen.
The publish function runs but the field is not created.
If i remove the first field and try to create a new one does the creation process work.
The version variable is fetched and the ProgId is unique.
Is there something else i can try?
One thing that is a bit weird is that the new field is not displayed at the bottom in the userdefined fieldlist in the admin view.