Skip to Content

Using elementsof Custom BO in standard business object makes elements read-only

Hi experts,

am creating instances of Custom BO, from standard business object beforesave event,

var Root :  elementsof CustomLG ;

Root.InternalID = "1" ;
  Root.LgStatus = "Requested"  ;
  Root.LgAmountData.content = this.LgAmount.content ;
  Root.LgAmountData.currencyCode = this.LgAmount.currencyCode ;

while the standard BO definition is

[DeploymentUnit(Financials)]  businessobject CustomLG raises MsgRequest 

on assigning elements to Root

Errorex : Identifier InternalID is read-only and cannot be changed.

Regards,

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 13, 2017 at 05:07 AM

    Hi Motaz,

    Is your Custom BO(CustomLG) has the same deployment unit(Financials) as the standard one?

    Regards,

    Senthil

    Add a comment
    10|10000 characters needed characters exceeded

    • Dear Senthil,

      Thank you, your solution is perfect, could you please send me FI posting ABSL code Sample, since i can't not add entries to AccountingEntry Bo using that code,

      var header :elementsof AccountingEntry;
        header.CompanyID = "AREEGY" ;
        header.AccountingDocumentTypeCode = "00047" ;
        header.BusinessTransactionTypeCode = "601" ;
        header.TransactionCurrencyCode = "EGP" ;
        header.AccountingClosingStepCode = "010" ;
        var newJV = AccountingEntry.Create(header);
      
        // Create Debit
        var newJVGL : elementsof AccountingEntry.Item ;
        newJVGL.DebitCreditCode = "1";
        newJVGL.ChartOfAccountsItemCode.content = "100001000";
        newJVGL.TransactionCurrencyAmount.content = 500;
        newJVGL.TransactionCurrencyAmount.currencyCode = "EGP" ;
        newJV.Item.Create(newJVGL);
      
        // Create Credit
        var newJVGL1 :  elementsof AccountingEntry.Item;
        newJVGL1.DebitCreditCode = "2";       
        newJVGL1.ChartOfAccountsItemCode.content = "105100000";
        newJVGL1.TransactionCurrencyAmount.content = -500;
        newJVGL1.TransactionCurrencyAmount.currencyCode = "EGP";
        newJV.Item.Create(newJVGL1);
      

      Regards,

      Thank you.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.