can we Validate field VIA CFONT ??

julkifli33julkifli33 Member Posts: 1,087
hi all
i use standard CFRONT in nav 2009 R2
it use Table G/L Budget Entry
now i want to test it to validate
i add new field in the table.. which is "Created Date"
and the in trigger
On Insert ()
"Created Date" := TODAY;

but when i save data from CFRONT.xls
how to make it validate?
so in the table it will be inserted that Created Date is today

thanks for the help

Comments

  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    C/FRONT is unable to execute any AL at all - it is only a simple CRUD API for NAV, so your triggers cannot be executed.

    The intended way to go in R2, to be able to execute your AL logic, is to go through a Web Service by exposing either a Page or a Codeunit.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • julkifli33julkifli33 Member Posts: 1,087
    dmccrae wrote:
    C/FRONT is unable to execute any AL at all - it is only a simple CRUD API for NAV, so your triggers cannot be executed.

    The intended way to go in R2, to be able to execute your AL logic, is to go through a Web Service by exposing either a Page or a Codeunit.

    so lets say i'm not using ms excel
    could i execute the code using .net or any other application outside?
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    You can do it from any environment capable of calling into web services, and yes that definitely includes .Net components.

    Here are some good starting points for NAV web services:

    http://msdn.microsoft.com/en-us/library/dd355036.aspx
    http://blogs.msdn.com/b/nav_developer/a ... rvice.aspx
    http://blogs.msdn.com/b/freddyk/archive ... again.aspx

    Of course this is quite a different approach to creating an app or .dll that consumes the c/front API, and there is some baggage to take care of with web services, but it will provide you with a future-proofed solution and it is highly integrated into the NAV Business APP.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • julkifli33julkifli33 Member Posts: 1,087
    dmccrae wrote:
    You can do it from any environment capable of calling into web services, and yes that definitely includes .Net components.

    Here are some good starting points for NAV web services:

    http://msdn.microsoft.com/en-us/library/dd355036.aspx
    http://blogs.msdn.com/b/nav_developer/a ... rvice.aspx
    http://blogs.msdn.com/b/freddyk/archive ... again.aspx

    Of course this is quite a different approach to creating an app or .dll that consumes the c/front API, and there is some baggage to take care of with web services, but it will provide you with a future-proofed solution and it is highly integrated into the NAV Business APP.

    ok thanks dmccrae for the link
    i will read that
    i thought we can insert row from excel and we can triggered the code from table
    so we just input several fields only
  • julkifli33julkifli33 Member Posts: 1,087
    does anyone have experience with Cfront?
    have create or modify for simple table?
Sign In or Register to comment.