on 12-12-2017 11:34 AM
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,
Hi Motaz,
Is your Custom BO(CustomLG) has the same deployment unit(Financials) as the standard one?
Regards,
Senthil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Senthil,
No the Standard BO'S is Opportunity, Sales Order
While trying to add Instances to Custom BO from "Opportunity-BeforeSave Event", it was working fine before adding the Notation [DeploymentUnit], but regarding the requirements i had to create journal entry voucher based on data in the created instance though action in the standard Bo.
Regards,
Hello Motaz,
Since Opportunity and Journal Entry are in different deployment units, write access would be disabled.
Perhaps, PID (Internal Communication) can be used as below,
Opportunity --> CustomBO --> PID --> DummyBO(Deployment unit of Journal Entry & logic to create journal entry) --> Journal Entry
Regards,
Senthil
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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.