cancel
Showing results for 
Search instead for 
Did you mean: 

how to send data from standard BO to another standard BO

0 Kudos

Hi experts,
I need to send data from extensions fields in standard BO to another extensions fields in another standard BO.

The standard BO are:

From: AccountingEntry ---> To: AccountingDocument

I try to do this with the attached script but it still does not work

alll of this for add a new field in the accounting documents.

Help please.

AccountingEntry

AccountingDocument

Script - AccountingEntry-Root - EventBeforeSave

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

rohanarthur
Participant
0 Kudos

Hi Geordan,

Sorry, I'm not sure why this code is not working.

But there might be an easier way to have these extension fields in both the views, by using extension scenarios.

you might already know this, but for other interested readers:
AccountingEntry = Journal Entry Voucher
AccountingDocument = Journal Entry

Right click on your solution and click 'Add', then select 'Process Extension Scenario'. Give a suitable name, and then search by the 'source' BO. In this case, AccountingEntry. You will then see all the possible extension scenario usages. Select the ones you want. For your present case, it might look like this:

click 'ok', save, activate.


Now, this allows you to declare your extension fields as part of the scenario. Like this:

You only need to add the fields once. Next, add these fields in the AccountingEntry and AccountingDocument screens using the Extensibility Explorer in UI Designer.

That's it. Now, the fields should be added to both views, and also should be in sync.

Regards,
Rohan

Answers (2)

Answers (2)

0 Kudos

Thank you for your answers, the AccountDcoument already have the fields. 😄

former_member275924
Active Participant
0 Kudos

Hi Geordan Amezquita ,

Use the scenario to send the data from Accounting Entry to Accounting Document .

You don't need to write the logic if you use the scenario .

1. Create Scenario to Accounting Entry to Accounting Document .

2. Declare the variable by using scenaio .

3. Add the extension field to Accounting Entry and Accounting Document in UI designer .

4. If you post the Journal Entry Voucher , the extension field will send to Journal Entry

jevdeclaration.png

jev.png

.journalentry.png

jev-scenario.png

Regards,

Charm