• gtuerk_greensaas
  • NEWBIE
  • 5 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 8
    Replies
I have provisioned an API Integration User user with the Salesforce API Integration User profile and granted a Permission Set to access Standard Objects, including Account, Contact, Order and Product (Product2).  Queries against Order Products (OrderItems) fail with an unsupported type, although these are granted appropriate permissions in the Permission Set.  The same query resolves correctly with a System Admin account.  If this is a product limitation with the use of the API Integration User license, please route appropriately to the Product team

https://INTENTIONALLY_OBSCURED.sandbox.my.salesforce.com/services/data/v55.0/query/?q=SELECT+name,(select+id+from+orderitems)+from+order+where+id='8018I000001zbmDQAQ'

 "message": "\nSELECT name,(select id from orderitems) from order where id='8018I000001zbmDQAQ'\n                            ^\nERROR at Row:1:Column:29\nDidn't understand relationship 'orderitems' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.",
        "errorCode": "INVALID_TYPE"

https://pow--dev1.sandbox.my.salesforce.com/services/data/v55.0/query/?q=SELECT+name,status+from+order+where+id='8018I000001zbmDQAQ'

{
    "totalSize": 1,
    "done": true,
    "records": [
        {
            "attributes": {
                "type": "Order",
                "url": "/services/data/v55.0/sobjects/Order/8018I000001zbmDQAQ"
            },
            "Name": null,
            "Status": "Fulfilled"
        }
    ]
}
I'm exploring two integration options for using partner community licenses for a call center.  There is a separate portal that has a bunch of other stuff in it but it interacts quite a bit with the Salesforce API.  As users get provisioned in that portal, we'll be granting them access to Partner Community licenses.  I would like to have the portal itself have one of those logins and interact with the REST API for CRUD operations.  We have a connected app set up and use OAUTH2 but that is against the main SFDC application, not the community.  I would like to avoid putting the community in a frame within that portal.  Is there a way to have the Partner Community login access the data via the REST API?
I have a node.js application that uses JSForce and subscribes to platform events.  The app is working fine in production (on Winter '20) but my sandbox that was refreshed for Spring '20 doesn't appear to be picking up new platform events that are published to the EventBus in APEX.  Is there a known issue with Platform events that is being worked out?
I'm trying to create an auto-initiated flow that will create n number of records of a custom object from the processing of a single other object.  The use case is that upon receipt of purchase request items that multiple equipment instances are created.  This is so easily accomplished in a trigger but is really clunky in flow builder.  All I can think to do is assign the quantity variable to a qtyDesired and qtyFulfilled variable and use a decision to flow either back into the decision after postprocess decrement or proceed when all is fulfilled.  It would be so much easier if you could iterate over a counter to seed the sObject instance that you then collect into a variable you'd use for Fast Record Create.  Anybody else crack this cookie?
I have a report with a chart that displays a boolean in a donut chart.  The boolean is "Current Customer".  My report displays correctly when you go to the report but when you embed that report in a Lightning record page and filter with the recordId, the display is only total record count, not showing the chart with the CurrentCustomer field.  Is this a known issue?  Seems like a defect
I'm doing my best to support the integration of Salesforce with a Billing Platform without any code in SFDC.  I've pointed the client to all the REST API resources they need to do basic CRUD operations and they're happy with that.  Now, I need SFDC to push a message out to a middleware service and I'm evaluating options.  Many moons ago, I would have had only one resource to choose from - an Outbound Message.  Today, with Platform Events and the Streaming API I have a couple more options.  The problem I'm facing is that the triggering event resides on one object, not directly related to the object structure that needs to be integrated.  I'm forced either to pollute my data model to support formula field-based inclusions in the payload or to write custom code to traverse the data model and include it on a platform event.  

I'm sure with Integration Cloud coming, the product team will likely point me that direction, but for now...  Here's the example:

Custom Object A - this is the triggering object.  When this object moves to 'Accepted', I wish to get to a related object via the following traverse.  Custom Object B looks up Custom Object A and is Detail in a master/detail relationship with Custom Object C.  Custom Object C looks up Custom Object D.  I want to pass the ID from Custom Object D in the platform event, which will be initiated from a process builder on Custom Object A.

the query in a pushTopic would be something akin to:  select id, name, (select Id, name, custom_object_c__r.custom_object_d__r.Id from custom_object_b__r) from custom_object_a__c where status__c = 'Accepted'.  I could cast the return of the related records in custom object b.

With outbound messages, I could generate a message with the Id of Custom Object A but would have to tell the middleware team to query and conditionally route the message.  

As a fall-back, I can write a trigger on Custom Object A and do the traverse and conditional spawn of the platform event.  But, again, I'd like to avoid writing code.  Any clever ideas?
I'm able to create an Order using the resource /services/data/v43.0/composite/tree/order, passing into the body some standard Order fields and a custom object related record set.  So that works.
I'm able to create a composite request using the resource /services/data/v43.0/composite/ that generates a custom object, reads it back, generates another custom object.  These with simple posts with data including the fields to be filled on the object.  So that works.  
What I can't do is to chain a composite call to resource /services/data/v43.0/composite and includes one of the transactions as a Post to the tree resource.  Has anybody else solved this?  The tree resource has slight syntactical differences (records is the root, rather than just the first field on the object), and I've tried each way, but to no avail.  Here's a sample of my 

{
    "allOrNone" : true,
    "compositeRequest" : [{
        "method" : "POST",
        "url" : "/services/data/v43.0/sobjects/Service__c",
        "referenceId" : "NewService",
        "body" : {  
            "Name" : "Insert Product Name here",
            "Status__c" : "Ordered",
            "Technical_Contact__c" : "003Z000002wpIVVIA2",
            "Account__c" : "001Z000001MCkgLIAT"
        }
    },{
        "method" : "GET",
        "referenceId" : "NewServiceInfo",
        "url" : "/services/data/v43.0/sobjects/Service__c/@{NewService.id}"
    },{
        "method":"POST",
        "url":"/services/data/v43.0/composite/tree/Order",
        "referenceId":"NewOrder",
        "body": {
            "AccountId" : "001Z000001MCkgLIAT",
    "EffectiveDate" : "2018-08-01",
    "Status" : "Draft",
    "Ordered_Service_Components__r" : {
        "records":[{
            "attributes" : {"type":"Service_Component__c", "referenceId":"ref2"},
            "Monthly_Recurring_Revenue__c": 800,
            "Status__c":"Pending Install",
            "Service__c":"a08Z0000006Z52DIAS",
            "Product_Pricing_Item__c":"a05Z00000097NjzIAE"
        }]
    }
        }
    }]
}

Any suggestions or commentary from SFDC product are welcome
It would be wonderful if the REST API documentation was a little more clear about the use of refresh_token or access_token in authenticated calls to the REST API.  There are a couple of blogs out there that touch on how to hit the API via Postman but the information contained in those is either conflicting or stale.  It would be best if the Trailhead modules better called out how to use tools other than the Workbench, which obfuscate the header creation and therefore don't help developers learn how to use this.  I struggled for a couple of hours yesterday and finally got the API working, only to wake up this morning and receive the INVALID_SESSION_ID error message on attempting the same invocation that succeeded hours before.  My connected app has OAUTH settings enabled that would seem to allow the use of the refresh token but maybe Postman doesn't send that in the header by default.  What recourse do developers have in this case if they haven't purchased premier support?

OAuth policies
Permitted UsersAll users may self-authorizeIP RelaxationRelax IP restrictions
UsageView OAuth UsageRefresh Token Policy:Refresh token is valid until revoked
Single LogoutSingle Logout disabled  
This application has permission to:Perform requests on your behalf at any time  
This application has permission to:Full access  
This application has permission to:Provide access to your data via the Web  
This application has permission to:Access and manage your data
I noticed something strange while building a small unlocked package that included a Lightning Record Page with Paths.  I enabled Paths within the Path Settings and set up a new Path for a Custom object I created.  I pulled down the source, create an unlocked package and version and installed that package version in a new scratch org.  The Lightning Record Page came over just fine, as did the Path itself, but when I looked at the object, the path wasn't there.  I went into Setup and looked at the Path Settings page and the setting was set to disabled.  When I reenabled this in the destination (target) scratch org, I was able to see the path and record page that included it worked just fine.  Is there a problem with carrying 'Path settings' forward in Unlocked Packages?  

#salesforcedx #package2 #pathsettings
I did not find any documentation on how to export files from salesforce. I see we can export Attachments using Dataloader. But does Dataloder support File export also?
I'm exploring two integration options for using partner community licenses for a call center.  There is a separate portal that has a bunch of other stuff in it but it interacts quite a bit with the Salesforce API.  As users get provisioned in that portal, we'll be granting them access to Partner Community licenses.  I would like to have the portal itself have one of those logins and interact with the REST API for CRUD operations.  We have a connected app set up and use OAUTH2 but that is against the main SFDC application, not the community.  I would like to avoid putting the community in a frame within that portal.  Is there a way to have the Partner Community login access the data via the REST API?
I have a node.js application that uses JSForce and subscribes to platform events.  The app is working fine in production (on Winter '20) but my sandbox that was refreshed for Spring '20 doesn't appear to be picking up new platform events that are published to the EventBus in APEX.  Is there a known issue with Platform events that is being worked out?
I'm trying to create an auto-initiated flow that will create n number of records of a custom object from the processing of a single other object.  The use case is that upon receipt of purchase request items that multiple equipment instances are created.  This is so easily accomplished in a trigger but is really clunky in flow builder.  All I can think to do is assign the quantity variable to a qtyDesired and qtyFulfilled variable and use a decision to flow either back into the decision after postprocess decrement or proceed when all is fulfilled.  It would be so much easier if you could iterate over a counter to seed the sObject instance that you then collect into a variable you'd use for Fast Record Create.  Anybody else crack this cookie?
I'm able to create an Order using the resource /services/data/v43.0/composite/tree/order, passing into the body some standard Order fields and a custom object related record set.  So that works.
I'm able to create a composite request using the resource /services/data/v43.0/composite/ that generates a custom object, reads it back, generates another custom object.  These with simple posts with data including the fields to be filled on the object.  So that works.  
What I can't do is to chain a composite call to resource /services/data/v43.0/composite and includes one of the transactions as a Post to the tree resource.  Has anybody else solved this?  The tree resource has slight syntactical differences (records is the root, rather than just the first field on the object), and I've tried each way, but to no avail.  Here's a sample of my 

{
    "allOrNone" : true,
    "compositeRequest" : [{
        "method" : "POST",
        "url" : "/services/data/v43.0/sobjects/Service__c",
        "referenceId" : "NewService",
        "body" : {  
            "Name" : "Insert Product Name here",
            "Status__c" : "Ordered",
            "Technical_Contact__c" : "003Z000002wpIVVIA2",
            "Account__c" : "001Z000001MCkgLIAT"
        }
    },{
        "method" : "GET",
        "referenceId" : "NewServiceInfo",
        "url" : "/services/data/v43.0/sobjects/Service__c/@{NewService.id}"
    },{
        "method":"POST",
        "url":"/services/data/v43.0/composite/tree/Order",
        "referenceId":"NewOrder",
        "body": {
            "AccountId" : "001Z000001MCkgLIAT",
    "EffectiveDate" : "2018-08-01",
    "Status" : "Draft",
    "Ordered_Service_Components__r" : {
        "records":[{
            "attributes" : {"type":"Service_Component__c", "referenceId":"ref2"},
            "Monthly_Recurring_Revenue__c": 800,
            "Status__c":"Pending Install",
            "Service__c":"a08Z0000006Z52DIAS",
            "Product_Pricing_Item__c":"a05Z00000097NjzIAE"
        }]
    }
        }
    }]
}

Any suggestions or commentary from SFDC product are welcome
I noticed something strange while building a small unlocked package that included a Lightning Record Page with Paths.  I enabled Paths within the Path Settings and set up a new Path for a Custom object I created.  I pulled down the source, create an unlocked package and version and installed that package version in a new scratch org.  The Lightning Record Page came over just fine, as did the Path itself, but when I looked at the object, the path wasn't there.  I went into Setup and looked at the Path Settings page and the setting was set to disabled.  When I reenabled this in the destination (target) scratch org, I was able to see the path and record page that included it worked just fine.  Is there a problem with carrying 'Path settings' forward in Unlocked Packages?  

#salesforcedx #package2 #pathsettings
Hi everyone,

We're using SFDX for our dev process, but recently - one of our developers added few field values in standard Order.Status field in his scratch org. This blocks sfdx force:source:pull entierly, following error appears:

> sfdx force:source:pull -u enxCommsMASIM_23
ERROR:  Unable to retrieve file for id 33 of type StandardValueSet due to an internal error:218292943-3106 (-173667445).


This is what i see in force:org:status
> sfdx force:source:status -u enxCommsMASIM_23
=== Source Status
STATE          FULL NAME                        TYPE              PROJECT PATH
─────────────
...
Remote Add     OrderStatus                      StandardValueSet


And now the environment is blocked, as I can't pull anything. Is there any workaround for this? 
We tried to eliminate standardValueSet in forceignore file, I don't see any way to reset remote.
Is it SFDX bug that standardValueSets are not supported?