Hi all. would you please help me to call the first...
# general
a
Hi all. would you please help me to call the first four digits under account from items record in netsuite. i have tried multiple combinations but the issue is that sometimes the account number appear in saved-search and other time it doesn't appears is there any way to work around this. thanks
m
To get the first four number it would just be SUBSTR({fieldID}, 1, 4)
a
thanks @MGBC but it didn't bring the fist 4 digits it brought the first 4 letters of the name ,is there any way to work around this issue. thanks
m
Is this a transaction search?
m
if you don't have sometimes account number this is the system account but normally if you have created your own COA , a number account it's mandatory. You can use a case when {accountnumber} is not null then SUBSTR({accountnumber}, 1, 4) else {accountname} end ( something like that)
m
If you add the Account field to the search what results does it give?
a
@MGBC it's item savedsearch not transaction
the issue is that the account is not exist on the item savedsearch it under transaction fields
@Marc i can't access accountnumber directly from item savedsearch it gives me the following error
ERROR: Field Not Found
m
Show me what you have for account please
It’s number + account number ?
a
yes when i try to create new account i have the following fileds but when i called accountnumber in the saved search it gives me the previous error
for some account i was able to bring it
m
Use this CASE WHEN {account.number} IS NULL THEN {account.name} ELSE REGEXP_SUBSTR({account}, '^\d+') END
a
i still got the error ERROR: Field Not Found
m
It’s item search ?
I check on my side
a
yes
thanks
m
@aziz ayoujil I don’t understand the logic of the search. A transaction gets the correct account from an item So when doing an item search joined to transaction it will only be referencing the sales or cogs account already set on the item record So why use transaction account when the transaction it using item account?
In short I’m recommending you rebuild this as a transaction search instead of item
a
thanks the issue is that is possible to call for item details from transaction savedsearvh because i'm syncing items from netsuite to salesforce
m
But you use income account ??
a
yes i use it in item record under accounting
m
So use income account, expense account, asset account, etc from the item record
Don’t try to join to transactions
a
the issue is that when i use income account it only gives me the account name not the account number
m
I think it’s normal but you can add a custom field on your item with only account number
a
ah i see that logical. i appreciate you assistance @MGBC @Marc thank you so much
m
I will look on my side
🙏 1
a
thanks
m
i think its not possible on saved search ( don't know why lol) but you can use like a say a custom field or you can create a data set on item ( you can see the account number}
a
thanks i used a custom field as you mentioned and suite script to subsring only account number
1