IPP Customer Object as Non Taxable - intuit-partner-platform

Looking for clarification / final answer:
Reference question: https://idnforums.intuit.com/messageview.aspx?catid=87&threadid=16477
What's the proper way to edit a customer and make them non-taxable?
If you set SalesTaxCodeId to "0" you get:
Error validating Sales Tax Code ID:Invalid integer.
If you set SalesTaxCodeId to "" the customer becomes taxable.
If you omit SalesTaxCodeId, the customer becomes taxable.
The docs say "If the field value is null, the job is not taxable. ", but that doesn't seem to be the case.
We have been setting SalesTaxCodeId to "" in the past, but it looks like this no longer works. Code is attached.
What's the right way?
Paul
It was noted at the issue was a bug and Paul noted it has since been fixed. For clarification, in order to set a customer as non-taxable, the SalesTaxCodeId / SalesTaxCodeName must be null fields?
Ex.
...
<SalesTaxCodeId />
<SalesTaxCodeName />
...

Per the documentation:
QBO only supports the customers or jobs being taxable or not, so if this field is "1", the job is taxable. If the field value is null, the job is not taxable. All other values are invalid.
Note that if you have specified a TaxAmt and TaxRate, SalesTaxCodeId will be "1" even if you don't specify it directly.
To make SalesTaxCodeId not taxable, TaxAmt and TaxRate must be null.
thanks,
Jarred

Related

maxTableColumnSize in .ipsproject-File

I need to store a String of at least 2000 chars in the database, but i get the following validation message in Faktor-IPS:
Spalten-Size erreicht das Limit [1..255]
I found the PersistenceOptions in the .ipsproject-File and the attribute maxTableColumnSize - which is set to 255. If I change this value to 2000, all seems fine. Are there other effects if this value is changed or is this attribute only used for the validation?
The 'maxTableColumnSize' is only used for this validation and should be set according to your database implementation. Typical values can be found here: https://blog.faktorzehn.de/2021/06/faktor-ips-persistenz-optionen/?lang=en

How can I achieve IF ALL ELSE, in Decision Table?

Drools 5.4
I have a decision table that sets values in the BlueReport object based on Channel Name attribute. Everything works, except if a Channel name contains an unknown channel for which we don't have mappings, we need to set the values to indicate this condition. The picture below should illustrate this more clearly, I'm sure. Here is what we want:
How can we achieve the "ALL OTHERS" default condition?!
I've evolved my spreadsheet rules to this now:
In this version of DT above, I have left B15 blank, and then I have added a new condition on C15 which checks the auditRule field for presence of string variable "DIV". I don't know if I have the right syntax for it in C9?! The ruleAudit field is update everytime there is a match for Channel Name (F11 - F15). Therefore, absence of DIV rule name, would indicate that there is no match to any of the patterns on B11 - B14. What do you think?!
Add a new condition column again with declaration for blueReport and set this condition
channel_name!=$1 || channel_name!=$2 ||channel_name!=$3 || channel_name!=$4
New Condition's value field must be empty for the first four records except these values like ChannelName1,ChannelName2,ChannelName3,ChannelName4 in "ALL OTHERS" row. Though this isn't the standard solution try this workaround to check
I think the post can help you. It means you should not only declare sequential in the RuleSet, but also declare PRIORITY in RuleTable that the rules will be called according to the value of PRIORITY.

Using "is null" when retrieving prices doesn't work

I am trying to get the price items for performance block storage that are generic (not specific to a certain datacenter). I can see that these have the locationGroupId set to blank or null, but I can't seem to get the objectFilter to work with that, the query returns nothing. If I omit the locationGroupId filter I get a result that contain both location-specific and non-location specific prices.
GET /rest/v3.1/SoftLayer_Product_Package/759/getItemPrices.json?objectMask=mask[locationGroupId,id,categories,item]&objectFilter={"itemPrices":{"categories":{"categoryCode":{"operation":"performance_storage_space"}},"item":{"keyName":{"operation":"$=GBs"}},"locationGroupId":{"operation":"is null"}}}
I am guessing there is something wrong with the object filter, any ideas?
If I filter on locationGroupId 509 it works:
/rest/v3.1/SoftLayer_Product_Package/759/getItemPrices.json?objectMask=mask[locationGroupId,id,categories,item]&objectFilter={"itemPrices":{"categories":{"categoryCode":{"operation":"performance_storage_space"}},"item":{"keyName":{"operation":"$=GBs"}},"locationGroupId":{"operation":509}}}
The reason it the first query didn't work while the second did was that I used the command "curl -sg" to do the request. While that eliminates the need to escape the {}[] characters - it also turns off escaping other characters correctly in the URL - like the space in "is null". Changing that to "is%20null" solves the issue.
I am posting this as the answer as I find it likely for others to encounter this problem.

Facebook ads-api: what are the adgroup_status field's values?

We'd like to get the complete list of values that the adgroup_status field can take. According to the FB docco it cannot assume the value CAMPAIGN_GROUP_PAUSED but we get that via the API.
Can someone supply the actual list of values this field may assume? In our code I see 14 values but it's likely incorrect/outdated:
ACTIVE
DELETED
PENDING_REVIEW
DISAPPROVED
PENDING_BILLING_INFO
CAMPAIGN_PAUSED
ADGROUP_PAUSED
NA
CAMPAIGN_GROUP_PAUSED
PAUSED
CREDIT_CARD_NEEDED
PREAPPROVED
DISABLED
ARCHIVED
these are the adgroup_status which we get we haven't seen any other apart from these. 'ARCHIVED' is to be added in the next migration changes. (refer here)
'ACTIVE'
'PAUSED'
'CAMPAIGN_PAUSED'
'CAMPAIGN_GROUP_PAUSED'
'DELETED'
'PENDING_REVIEW'
'PREAPPROVED'
'DISAPPROVED'
'PENDING_BILLING_INFO'
'ADGROUP_PAUSED'
'CREDIT_CARD_NEEDED'

Get statuscode text in C#

I'm using a plugin and want to perform an action based on the records statuscode value. I've seen online that you can use entity.FormattedValues["statuscode"] to get values from option sets but when try it I get an error saying "The given key was not present in the dictionary".
I know this can happen when the plugin cant find the change for the field you're looking for, but i've already checked that this does exist using entity.Contains("statuscode") and it passes by that fine but still hits this error.
Can anyone help me figure out why its failing?
Thanks
I've not seen the entity.FormattedValues before.
I usually use the entity.Attributes, e.g. entity.Attributes["statuscode"].
MSDN
Edit
Crm wraps many of the values in objects which hold additional information, in this case statuscode uses the OptionSetValue, so to get the value you need to:
((OptionSetValue)entity.Attributes["statuscode"]).Value
This will return a number, as this is the underlying value in Crm.
If you open up the customisation options in Crm, you will usually (some system fields are locked down) be able to see the label and value for each option.
If you need the label, you could either do some hardcoding based on the information in Crm.
Or you could retrieve it from the metadata services as described here.
To avoid your error, you need to check the collection you wish to use (rather than the Attributes collection):
if (entity.FormattedValues.Contains("statuscode")){
var myStatusCode = entity.FormattedValues["statuscode"];
}
However although the SDK fails to confirm this, I suspect that FormattedValues are only ever present for numeric or currency attributes. (Part-speculation on my part though).
entity.FormattedValues work only for string display value.
For example you have an optionset with display names as 1, 2, 3,
The above statement do not recognize these values because those are integers. If You have seen the exact defintion of formatted values in the below link
http://msdn.microsoft.com/en-in/library/microsoft.xrm.sdk.formattedvaluecollection.aspx
you will find this statement is valid for only string display values. If you try to use this statement with Integer values it will throw key not found in dictionary exception.
So try to avoid this statement for retrieving integer display name optionset in your code.
Try this
string Title = (bool)entity.Attributes.Contains("title") ? entity.FormattedValues["title"].ToString() : "";
When you are talking about Option set, you have value and label. What this will give you is the label. '?' will make sure that the null value is never passed.