Determine if new Business Partner address is Bill To or Ship To
AnsweredI have created a Business Partner UF that is triggered on the State field of Addresses. It will then update Tax Code and TaaS Enabled. These fields are not exposed on the form for Bill To addresses.
When creating a new address record (CRD1), how can I know/determine if the address is to be a Bill To or Ship To without actually saving the address information?
If that isn't possible, how does one check for field existence on a form, to prevent errors such as "[Check that it is visible and active]"?
Thanks in advance for any help that can be provided.
-
Official comment
Hi Jennifer,
You can set a @STORE variable which you can test against. For example:
@STORE1 = SQL(SELECT T0.[AdresType] FROM CRD1 T0 WHERE {your logic} ) ;
IF (@STORE1 = 'S')
BEGIN
MESSAGEBOX(Ship To Address);
END
-
Hi Jennifer,
A quick way to work around it might be to add TRY/CATCH around your code that is setting the tax fields
TRY
BEGIN
Set($[$item.col.type]|valueToSet);
END
CATCH
BEGIN
// Do nothing
ENDOtherwise you could setup a line loop to detect whether the selected row in Item 69 (The address list) is before or after the "Ship To" line...I haven't tried this but assume it would work. Then execute your UF if the line loop criteria is met.
Please sign in to leave a comment.
Comments
2 comments