Skip to Content

How to update Campaign in Sales Order

Feb 14 at 11:19 AM


avatar image

Dear Experts,

While editing Salesorder based on some conditions, I want to create /Edit campaign to a specific value.

In event aftermodify of SO,Iam trying as below :

var campaign : elementsof SalesOrder.BusinessTransactionDocumentReference;
--campaign.BusinessTransactionDocumentRelationshipRoleCode -- Readonly
--campaign.BusinessTransactionDocumentReference -- Readoinly

But this is not allowing to create a campaign .Same issue in Edit also .

Plesae help in resolving

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lewis Peters Feb 15 at 02:39 PM

I suggest you look to see if there's already a pre-existing reference --- you might be able to follow the association chain to set the ID, e.g. currentSalesOrder.CampaignReference.BusinessTransactionDocumentReference.ID.content or something of the ilk.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Dear Lewis,

Its not allowing to edit the campaign id from Sales order AfterModify event. It says it as read only.

Please suggest how to proceed on this.

campaign.png (6.1 kB)


Is your solution in the same namespace as the SalesOrder business object? If so, you might be out of luck. Is the campaign ID editable in the front end from the salels order?