function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gporrogporro 

Differet results inserting records thru the API vs. UI

Hello

 

I run into a strange behavior that I hope some of you might have seen before.

 

You know like you can have Children objects and in the Parent Object sometimes you have a field that tells you if there are any Children linked to the parent? One example is the "Has Products" field on the Opportunity, that is set to TRUE when the opportunity has line items. These fields are not really visible. You generally see them on reports only, but cannot edit or see them on the page layouts.

 

We have an intergartion with Marketo, pushing Accounts and Assets to Marketo via the Marketo<>SFDC SYNC.

 

In my scenario I am using the API to upload Assets in SFDC from an external Database. Assets are linked to SFDC Accounts.

 

The issue I have is the follwing:

 

1) if I insert an Asset thru the UI, linking it to an Account, and hit SAVE, once the Account is sync-ed with Marketo I have a field that says "Has Assets" and this is set to TRUE for this record I just inserted. This is correct.

 

2) if I insert an Asset thru the API, linking it to an Account, once the Account is sync-ed with Marketo I have a field that says "Has Assets" and this is set to FALSE for this record I just inserted. This is not correct. The "Has Asset" should be true, as I inserted an Asset for this account

 

For some reason it looks like if I use the API, the parent "has xyz" field does not get updated.

 

Has anyone seen this issue before? Any ideas of what I can do to obtain the same behavio with data I insert thru the UI and tru the API?

 

Thanks

Giorgio