Friday 10 April 2015

Importance of SaveLast() in RunBase Framework

Hi Friends,
RunBase Framework is widely used in AX. In this post, I would like to highlight the importance of SaveLast() function. Understanding of pack/unpack pattern is must to utilize this class in the most effective way.

SaveLast() is used to save the latest state of the class. That means even after the class is unpacked we can still update the packed state of the class.  



One common scenario where it is very useful is when we need to show the values of fields from the caller record on the dialog . In such scenarios this method needs to be called before the prompt() method . This way the packed state is updated with the latest values and in the dialog() method you can access the latest values. 

This can been seen in many standard AX classes which extend RunBase class





So if you are packing some variables, which you are also initialising in the main method and want to show on the dialog, then call saveLast() method before prompt() to get the most recent values.

Thanks for reading the blog. Have a great day.

9 comments:

  1. Nice posts keep it up . You can visit my blog also and can give your review.

    http://msdynamicsxx2012.blogspot.com/

    ReplyDelete
  2. The Le_Meridian Funding Service went above and beyond their requirements to assist me with my loan which i used expand my pharmacy business,They were friendly, professional, and absolute gems to work with.I will recommend  anyone looking for loan to contact. Email..lfdsloans@lemeridianfds.com  Or lfdsloans@outlook.com.WhatsApp ... + 19893943740.

    ReplyDelete
  3. Really, I enjoy your site with effective and useful information. Hire dynamics nav consultant

    ReplyDelete
  4. I now own a business of my own with the help of Elegantloanfirm with a loan of $900,000.00 USD. at 2% rate charges, at first i taught with was all a joke until my loan request was  process under five working days and my requested funds was transfer to me. am now a proud owner of a large business with 15 staffs working under me. All thanks to the loan officer Russ Harry he is a God sent, you can contact them to improve your business on.. email-- Elegantloanfirm@hotmail.com. / Whatsapp number +393511617486

    ReplyDelete
  5. "When I was applying for a loan to purchase my building as a small business owner in a tough situation, conventional banks said they could not help me. the loan firm from mr lee sat down with me, heard my situation and decided that I was worth taking a chance on. Here we are 5 years later and I have just renewed my loan for another 7 years. I couldn’t have purchased my building without the help of the loan from mr lee and will be forever indebted to them for giving me a chance when no one else would."here is mr lee contact Email: 247officedept@gmail.com Also on whatsApp: +1-989-394-3740So I will advise anyone here looking for a loan to contact mr lee for an assistance of loan fundings.

    ReplyDelete
  6. Our company is into project funding, Loan, joint venture, Equity and we are globally willing to fund companies, Private bodies,Government bodies and we are ready to help you with any kind of financial needs. In-case you are interested with my company financial services do get back to me with Kindly get back to us: magmafincropp@gmail.com
    Whats-app us on +917428734439

    ReplyDelete
  7. My name is Hussain, I am a Jordanian citizen. But I live in Austria. I was trying to get a loan to start my business, but nothing worked for me until I was surfing the internet and seeing someone testify about how she got a loan from loan credit institutions, so I copied the contact (loancreditinstitutions00@gmail.com) so I contacted them and applied for a loan of $ 25,000 they approved the loan and granted it to me., now I'm up and running and everything is going smoothly. If you want to take a loan, please contact them via email: loancreditinstitutions00@gmail.com or use Whatsapp: +393509811524. and apply.

    ReplyDelete