web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Duplicate subscription events are getting fired automatically

(1) ShareShare
ReportReport
Posted on by 26
HI All,
 
We are doing BC to salesforce integration. So whenever an item is created in BC through subscription API we are trying to push to SF , so subscripted to items table.
 
The problem is in the otems card when ever I add anythng in the field BC automatically saving the record and firing the event.
 
Suppose say if am entering the Product name as /Test/
 
then one event is firing for /T/ and one for /E/ and so on. But I dont want this kind of behaviour as it will increase the complexity. Once all the fields are entered then only I need the subscription event to be fired. And below is one request
 
/value/: [
{
/subscriptionId/: /1758e0fe5c66448c823480ae5a86da1a/,
/clientState/: /RegisterCustomers/,
/expirationDateTime/: /2024-02-26T21:47:18Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/customers(acb3aed2-e34f-ed11-bfc3-001dd8b71ebf)/,
/changeType/: /updated/,
/lastModifiedDateTime/: /2024-02-26T11:17:17.373Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(dd48b68e-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /created/,
/lastModifiedDateTime/: /2024-02-26T10:41:12.507Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(dd48b68e-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /updated/,
/lastModifiedDateTime/: /2024-02-26T10:42:00.747Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(dd48b68e-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /deleted/,
/lastModifiedDateTime/: /2024-02-26T10:42:28.97Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(b808aeca-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /created/,
/lastModifiedDateTime/: /2024-02-26T10:42:59.63Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(b808aeca-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /updated/,
/lastModifiedDateTime/: /2024-02-26T10:43:03.213Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(b808aeca-93d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /deleted/,
/lastModifiedDateTime/: /2024-02-26T10:44:32Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(05313410-95d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /created/,
/lastModifiedDateTime/: /2024-02-26T10:52:05.5Z/
},
{
/subscriptionId/: /f3abab4af53c4210a170dfe234a7a37b/,
/clientState/: /CreateProductsInSF/,
/expirationDateTime/: /2024-02-27T18:00:31Z/,
/resource/: /api/v2.0/companies(1909e69c-24f3-ec11-bfb0-001dd8b71ebf)/items(05313410-95d4-ee11-bfdf-001dd8b71ebf)/,
/changeType/: /deleted/,
/lastModifiedDateTime/: /2024-02-26T11:26:18.597Z/
}
]
}
 
 
Is there any way to resolve this ?
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at
    Which event did you subscribe to? For example, if the OnAfterModifyEvent of the table is used, this problem should not occur.
     
    Hope this helps.
    Thanks.
    ZHU
  • Community member Profile Picture
    17 on at
    Hi,
     
    I just subscribed through
     
     
    I am not sure how to acheive with the below answer you gave. Can you guide me how to put that code into BC?
     
    Thanks
    V S

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans