Monday, 15 June 2015

CRM 2011 & Typescript: How to get sections within a tab -


We are implementing our client-side logic using TypeScript on one of our CRM 2011 projects. So far, it is very good.

However, some sections of the Xrm2011.1_0.d.ts file are thought of. Tabs and sections are defined as follows:

  Module Xrm {Export Module Page {... Export Module ui {... Export Module Tab {...} Export Function Found (tabName: string): Tab; ... Export module classes {... get export function (section name: string): section; ...}}}}   

This forces you to apply a typecript to:

  var section = < Xrm.Page.Section & gt; Xrm .Page.ui.tabs.sections.get (sectionName);   

For who compiled:

  Xrm.Page.ui.tabs.sections.get (sectionName);   

However, the correct javascript syntax should be:

  Xrm.Page.ui.tabs.get (tabName) .sections.get (sectionName); Has anyone experienced this? Am I missing something here?  

Thanks in advance.

won the final syntax is not working tab, so tab .get a TB class Returning, but the tab is not in the square. You do not need to be cast

Ps ... Try to declare your module with dot notation declaring "export xrm.page.uiabas". This will give you more readable code

Besides, did you capitalize some sections and nothing else?

No comments:

Post a Comment