Akash,
 
Doing fine here. Try to recompile the object and please check your modifications.
 
Regards,
Sonny Wibawa Adi

akash malohatra <[EMAIL PROTECTED]> wrote:
Hi,

Thanks all for your help.

But now when i am implimenting the below code (using
the Map) , my axapta crashes when i run the forrm and
click the Marktrans check box. 

this is the Crash log:
Axapta Crash Dump File for Axapta build 1951.2410 (Aug
19 2003 19:44:15)
Dumped  : Mon Aug 02 12:34:13 2004

Crash   : Exception 0xc0000005 caught (unspecified) in
thread 0xc78 of process 0xa34.
-------------------------------------------------------------

--# FV EIP----- RetAddr- FramePtr StackPtr Symbol

  0 .V 0049cbf8 0049d4b4 0012e0f4 0012e0a4     Mod: 
ax32[ax32.exe], base: 00400000h

  1 .V 0049d4b4 00000000 00000000 0012e0a4     Mod: 
ax32[ax32.exe], base: 00400000h

Stackdump exit code 487 (Attempt to access invalid
address)


Any one has idea...why this happens....

Regards
Akash
--- Sonny Wibawa Adi <[EMAIL PROTECTED]>
wrote: 
> Akash,
>  
> You should store your checkbox value into a
> variable. Another solution is to create a new field
> at CommissionTrans table and then set "SaveContents"
> property to "No". You now may override modified
> method at that new field.
>  
> The first solution, you have to add a code, for
> example is like this:
>  
> Classdeclaration:
>  
> map oMark;
>  
> Init:
> oMark = new map(types::Integer,types::Integer);
> 
>  
> edit NoYes markTrans(boolean                 set,
>                       CommissionTrans 
>  _commissionTrans,
>                       NoYes              _markTrans)
>  {
>       
>       if (set)
>      {
>        element.lock();
>          if (_markTrans == NoYes::Yes)
>         {
>            BalanceAmount +=
> _CommissionTrans.AmountMST;
>         }
>          else
>          {
>            
>            BalanceAmount -=
> _CommissionTrans.AmountMST;
>          }
>        element.unLock();
>        this.refresh();
>        
> oMark.insert(_commissionTrans.RecId,_markTrans);
>     }
>     else
>     {
>         if (oMark.exists(_commissionTrans.RecId))
>         {
>             _markTrans =
> oMark.lookup(_commissionTrans.RecId);
>         }
>  
>     }
>     
>      return _MarkTrans;
>  }
> 
>  
> Regards,
> Sonny Wibawa Adi
> 
> bmp_thydatacenter_dk <[EMAIL PROTECTED]> wrote:
> I think the problem is that the third parameter
> _markTrans only has 
> a defined content if the first parameter is true.
> 
> You should have a global variable in the
> classdeclaration of the 
> form holding the current status of the checkbox.
> Only access and use 
> the _markTrans parameter to read the new value in
> the field if the 
> first parameter is true. Then you can tranfer the
> new value to you 
> global variable, which is the one the method is
> returning.
> 
> Best regards,
> Bj�rn M�ller Pedersen
> Thy Data Center Development A/S
> 
> edit NoYes markTrans(boolean          _set,
>                      CommissionTrans 
> _commissionTrans,
>                      NoYes            _markTrans)
> {
>     if (set)
>     {
>         markTrans = _markTrans;
>        
>         element.lock();
>         if (_markTrans == NoYes::Yes)
>         {
>             balanceAmount +=
> _CommissionTrans.AmountMST;
>         }
>         else
>         {
>             balanceAmount -=
> _CommissionTrans.AmountMST;
>         }
>         element.unLock();
>         this.refresh();
>     }
>     
>     return markTrans;
> }
> 
> 
> --- In [EMAIL PROTECTED], akash
> malohatra 
> <[EMAIL PROTECTED]> wrote:
> > Hi All,
> > 
> > I have problem in implimenting this Edit method.
> When
> > i am trying to click the check box. It never
> checks ,
> > still its editable...whats wrong in code....
> > 
> > 
> > edit NoYes markTrans(boolean                 set,
> >                      CommissionTrans 
> > _commissionTrans,
> >                      NoYes             
> _markTrans)
> > {
> >      
> >      if (set)
> >     {
> >       element.lock();
> >         if (_markTrans == NoYes::Yes)
> >         {
> >           BalanceAmount +=
> _CommissionTrans.AmountMST;
> >        }
> >         else
> >         {
> >           
> >           BalanceAmount -=
> _CommissionTrans.AmountMST;
> >         }
> >       element.unLock();
> >       this.refresh();
> >    }
> >    
> >     return _MarkTrans;
> > }
> > 
> > This method is in the Datasource of the form . and
> > this is a checkbox in my grid.
> > 
> > Thanks
> > Akash
>             
> ---------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> 
> [Non-text portions of this message have been
> removed]
> 
> 
> 
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> 
> Yahoo! Domains - Claim yours for only $14.70
>
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
>
--------------------------------------------------------------------~->
> 
> 
>  
> Yahoo! Groups Links
> 
> http://groups.yahoo.com/group/development-axapta/
> 
>     [EMAIL PROTECTED]
> 
>  
> 
>  


      
      
            
___________________________________________________________ALL-NEW Yahoo! Messenger - 
all new features - even more fun!  http://uk.messenger.yahoo.com


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


                
---------------------------------
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.

[Non-text portions of this message have been removed]




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/development-axapta/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to