EP Samples from TechReady3

Yesterday (07/24/2006) I presented at TechReady3 (Microsoft‘s Internal Technical Readiness Event) on the EP Session. I demoed creating a web page to display vendor list with “zero code”. And then I demoed how you could do the same thing completely through coding to control the layout and format. Then I demoed the WebPart Connection and how you can control what is being displayed on the left menu based on some business logic and here is the code sample that I used.

Here is the sample code  of the weblet that I created in this demo

public class TechReadyWebLet extends WebLet
 boolean _even;

public void run(Args args)
    str ret;
    VendTable vt;
    ret = "<h1>Top 10 Vendors</h1>";
    ret += "<table border=0>";

    while select vt
    where vt.AccountNum < '3010'
    if ( _even ==1)
     ret += "<tr>";
   ret += "<td><div class=formcaption>";
   if ( vt.VendGroup == '10')
     ret += "<IMG src=/_layouts/ep/images/green.gif /> ";

    if ( vt.VendGroup == '50')
    ret += "<IMG src=/_layouts/ep/images/yellow.gif /> ";

  ret+= vt.name + "</div>";
  ret += vt.address + "<br>" + vt.state +" " + vt.zipcode + "<br>" + vt.countryregionid + "</td>";

    if ( _even ==0)
     ret += "</tr>";

    _even = _even ? 0 : 1;

    ret += "</table>";


Here is the sample code that I used in EPVendTableInfo Web form to demo the Web Part connection


public boolean showMenuFunction(WebMenuFunction _menuFunction)
    boolean ret;
ret = super(_menuFunction);

if (_menuFunction.name() == weburlitemstr(EPDocuList) && vendTable.VendGroup == '50')
        ret = false;

    return ret;

public Common setMenuFunctionRecord(WebMenuFunction _menuFunction, Common _cursor)
      Common ret;
    if (_menuFunction.name() == weburlitemstr(EPDocuList))
        ret = null;
        ret = super(_menuFunction, _cursor);

    return ret;


Comments (5)

  1. mugz says:

    ret+= vt.name + “</div>”;
     ret += vt.address + “<br>” + vt.state +” ” + vt.zipcode + “<br>” + vt.countryregionid + “</td>”;

    In the “Writing Solid Code” was mentioned that MS inspects even examples for security flaws.

    Can you add HTML escaping to this code?

  2. Q: On the sales orders info web form on the enterprise portal (Sales &amp;gt; Sales orders &amp;gt; select one…

  3. samiyusuf says:

    i am trying to integrating dynamic Ax with WSS 2007,but i have a lot of problem,

    such as when i deploy EP only have

       -deployStaticFiles:    Success

       -DeployWebPart:        Success

       -DeploySiteDefinition: Success

    but it doesn’t success with axwebparts.cap:Deploying to http://YourServerName

    please what can i do?=???

    please help me

Skip to main content