In 4.0 I have a custom entity ‘new_changerequest’ with a 1:N relationship to
Account, i.e. Account -> new_changerequest. On the Account form I have a
button defined in ISV-Config to create a new new_changerequest:
<Button Icon="/_imgs/ico_18_4412.gif" JavaScript="
var oId=crmForm.ObjectId;
var newwindow =
window.open('/userdefined/edit.aspx?_CreateFromType=1&_CreateFromId='+ oId +
'&etc=10008#',
'_blank','left=20,top=20,width=880,height=600,tool bar=0,status=1,resizable=1');"
Client="web,Outlook" AvailableOffline="true">
</Button>
My problem is that the ObjectTypeCode of new_changerequest (10008) may/will
change when ISV-Config is moved from development to production, i.e. the
value 10008 may in production be something else. I therefore want to be able
to create that value dynamically, but haven’t found a way to do so.
If the relationship was the other way around, it wouldn’t be a problem (use
lookup), neither if this was in a plugin, where I can access the metadata.
But in ISV-Config I believe I have to do this from Javascript and haven’t
figured out how-to.
--
Best regards,
Per