• Thomas Korthuis
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
I have been running into walls on this one and I'm wondering if anyone has had a similar experience?

I'm looking to connect an External OData source. I attempt to add a new source (Setup > External Data Sources > New External Source) and the only selection I have is "Simple URL". I'm missing the OData types from the drop-down that are readily available in any developer edition of SF. 

I've raised this issue with Support, and after a week of back and forth, they keep closing the case saying it's a developer issue.

Now something that I read in the documentation left me thinking that they may be right, in a way, and this may not be a support issue. There was mention of this being available "at an extra cost" for Enterprise customers (here: https://help.salesforce.com/articleView?id=platform_connect_add_external_data_source.htm&type=0&language=en_US). In reading this, I contacted Sales.  

Unfortunately, I seemed to run into another issue there, which is that Sales is not able to identify the feature I'm describing, despite sharing the language and product range names from the documentation, in detail. Three separate agents later still no luck finding a definitive answer or a step closer towards a solution. 

I'm trying not to lose hope here. There has to be some information out there on how to either A. enable the OData adapters as an option or B. purchase and apply the correct licencing. 

I'm fully accepting the possibility as well that I'm just overlooking some obvious articles or options somewhere since I've been staring at this for a while now.

Looking for anybody who has had a similar experience or who may have some guidance on how to approach getting an OData source connected. 
I'm fairly new to writing out apex code, so any input would be greatly appreciated. 

Here is the current setup and problem I'm running into:
I have a custom formula field with the OrderItem Object which generates a JSON string based on the product information (this JSON string is used to send lineItem order information to another system). This field is called QBO_Line_JSON__c. I'm trying to populate a custom field in the Order object (QBO_JSON__c) that combines all the QBO_Line_JSON__c fields from the related OrderItem records. The goal is to have one JSON string that can be queried from the external system that lives in the Order object.

Here is the code so far:
trigger qboJSONCreator on Order (after insert, after update, after delete, after undelete) {

List<Order> OrderList = (Trigger.isInsert|| Trigger.isUnDelete) ? Trigger.new : Trigger.old;

List<Id>OrderIds = new List<Id>();

for (Order OrderStr : OrderList) {
OrderIds.add(OrderStr.OrderItems);
}

List<OrderItem> OrderItemList = [select id, (select id, QBO_Line_JSON__c from OrderItems) from Order where id in :OrderIds];

for (OrderItem ordr :OrderItemList) {
  for(integer i=1;i < ordr.OrderItem.size();i++)
  {
    ordr.QBO_JSON__c = ordr.QBO_JSON__c + '; ' + string.valueOf(ordr.OrderItem[i].QBO_Line_JSON__c);
  }
}

update OrderItemList;

}
The above gives me an error "Incompatible element type List<OrderItem> for collection of Id"

I've looked but haven't been able to piece together an understanding of how to resolve it. 

Any input or pointing in the right direction would be great. 

Thanks in advance!

 
I have been running into walls on this one and I'm wondering if anyone has had a similar experience?

I'm looking to connect an External OData source. I attempt to add a new source (Setup > External Data Sources > New External Source) and the only selection I have is "Simple URL". I'm missing the OData types from the drop-down that are readily available in any developer edition of SF. 

I've raised this issue with Support, and after a week of back and forth, they keep closing the case saying it's a developer issue.

Now something that I read in the documentation left me thinking that they may be right, in a way, and this may not be a support issue. There was mention of this being available "at an extra cost" for Enterprise customers (here: https://help.salesforce.com/articleView?id=platform_connect_add_external_data_source.htm&type=0&language=en_US). In reading this, I contacted Sales.  

Unfortunately, I seemed to run into another issue there, which is that Sales is not able to identify the feature I'm describing, despite sharing the language and product range names from the documentation, in detail. Three separate agents later still no luck finding a definitive answer or a step closer towards a solution. 

I'm trying not to lose hope here. There has to be some information out there on how to either A. enable the OData adapters as an option or B. purchase and apply the correct licencing. 

I'm fully accepting the possibility as well that I'm just overlooking some obvious articles or options somewhere since I've been staring at this for a while now.

Looking for anybody who has had a similar experience or who may have some guidance on how to approach getting an OData source connected. 
I'm fairly new to writing out apex code, so any input would be greatly appreciated. 

Here is the current setup and problem I'm running into:
I have a custom formula field with the OrderItem Object which generates a JSON string based on the product information (this JSON string is used to send lineItem order information to another system). This field is called QBO_Line_JSON__c. I'm trying to populate a custom field in the Order object (QBO_JSON__c) that combines all the QBO_Line_JSON__c fields from the related OrderItem records. The goal is to have one JSON string that can be queried from the external system that lives in the Order object.

Here is the code so far:
trigger qboJSONCreator on Order (after insert, after update, after delete, after undelete) {

List<Order> OrderList = (Trigger.isInsert|| Trigger.isUnDelete) ? Trigger.new : Trigger.old;

List<Id>OrderIds = new List<Id>();

for (Order OrderStr : OrderList) {
OrderIds.add(OrderStr.OrderItems);
}

List<OrderItem> OrderItemList = [select id, (select id, QBO_Line_JSON__c from OrderItems) from Order where id in :OrderIds];

for (OrderItem ordr :OrderItemList) {
  for(integer i=1;i < ordr.OrderItem.size();i++)
  {
    ordr.QBO_JSON__c = ordr.QBO_JSON__c + '; ' + string.valueOf(ordr.OrderItem[i].QBO_Line_JSON__c);
  }
}

update OrderItemList;

}
The above gives me an error "Incompatible element type List<OrderItem> for collection of Id"

I've looked but haven't been able to piece together an understanding of how to resolve it. 

Any input or pointing in the right direction would be great. 

Thanks in advance!