cancel
Showing results for 
Search instead for 
Did you mean: 

How to create entry via absl in Customer -> Tax numbers ?

former_member585227
Participant
0 Kudos

Hi,

For some reason i have to use KUT field for tax number. But I also control the tax number value whether its exists before replication to ERP via cloud app studio enhancement implementation. According to note 2604776, its not possible to use KUT fields in enhancement implementation so i want to copy data from KUT tax number field to Tax numbers node. So i need to create entry under Customer-->Tax numbers using ABSL code.

If it is possible can you guide me ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member422907
Contributor
0 Kudos

Hi,

In taxnumber node of account extenstion standard BO, after modify you may use for example:

this.TaxID.content="12345679";

this.CountryCode="HR";

this.TaxTypeCode.content="2";

br,

Zoran

former_member585227
Participant
0 Kudos

Hi Zoran, thanks for quick response.

I have already tried similar coding but there is no succes. You can find it below.

I'm working under Root node because i want code to run after i fill the newTaxNoField. If i work under Tax number node, code runs after i click Add button under tax numbers tab.

import ABSL;

var country;
var newTaxNoField;
var stdTaxNoField;

	country = this.AddressInformation.Address.PostalAddress.GetFirst().CountryCode;
	newTaxNoField = this.Common.GetFirst().ZTAXNO;

if(country == "HR"){
	if(!newTaxNoField.IsInitial()){
		stdTaxNoField = newTaxNoField;
		
		this.TaxNumber.GetFirst().CountryCode = "HR";
		this.TaxNumber.GetFirst().TaxTypeCode.content = "2";
		this.TaxNumber.GetFirst().TaxID.content = stdTaxNoField;
	}
}
former_member422907
Contributor
0 Kudos

in this case use following:

this.TaxNumber.Create();
this.TaxNumber.GetFirst().CountryCode="HR";
this.TaxNumber.GetFirst().TaxTypeCode.content="2"; this.TaxNumber.GetFirst().TaxID.content="123456789";
former_member585227
Participant
0 Kudos

There is no usable Create() function.

former_member422907
Contributor
0 Kudos

I assume that you are in event AfterModify,try to use event beforeSave instead.

br,

Zoran

former_member585227
Participant
0 Kudos

I'm still getting the same error at BeforeSave event.

former_member422907
Contributor

interesting....

here is mine:

former_member585227
Participant
0 Kudos

Really interesting. Is it a version thing ? Do you have an idea ?

former_member585227
Participant
0 Kudos

The reason is "Mass Enable" check box. I have unchecked it and everything is fine, thanks !

former_member422907
Contributor
0 Kudos

Please accept the answer:-)

Answers (0)