Codeunit CCS DIS Partner Send Adapter
codeunit 5100924 "CCS DIS Partner Send Adapter"
Methods
ProcessAndSend
public "CCS DIS Partner Send Adapter" ProcessAndSend(PartnerMapping: Record "CCS DIS Partner Mapping"; var TempSentMessage: Record "CCS DIS Partner Sent Message" temporary): None
Processes a partner mapping and sends all messages.
Writes message nodes.
Repeats until EndOfLoop is reached.
Parameters
| Name |
Type |
Description |
| PartnerMapping |
Record "CCS DIS Partner Mapping" |
The partner mapping to execute process and send. |
| TempSentMessage |
Record "CCS DIS Partner Sent Message" temporary |
A temporary list of all messages created, by reference. This list might contain deleted messages. |
Return Value
None
SendMessage
public "CCS DIS Partner Send Adapter" SendMessage(var SentMessage: Record "CCS DIS Partner Sent Message"): None
Sends a written message to the partner.
Parameters
| Name |
Type |
Description |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
The message to be sent, by reference. This list might contain deleted messages. |
Return Value
None
SetSequenceLine
public "CCS DIS Partner Send Adapter" SetSequenceLine(Value: Record "CCS DIS Sequence Line"): None
Sets the sequence line as global variable.
Parameters
| Name |
Type |
Description |
| Value |
Record "CCS DIS Sequence Line" |
The sequence line. |
Return Value
None
Events
OnAfterProcessAndSend
event "CCS DIS Partner Send Adapter" OnAfterProcessAndSend(PartnerMapping: Record "CCS DIS Partner Mapping"; var TempSentMessage: Record "CCS DIS Partner Sent Message" temporary)
The event is fired after the partner mapping has been processed and all messages have been sent.
Parameters
| Name |
Type |
Description |
| PartnerMapping |
Record "CCS DIS Partner Mapping" |
The partner mapping that was processed. |
| TempSentMessage |
Record "CCS DIS Partner Sent Message" temporary |
A temporary list of all created messages. This list might contain deleted messages. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnAfterProcessPartnerMappingAndWriteMessage
event "CCS DIS Partner Send Adapter" OnAfterProcessPartnerMappingAndWriteMessage(PartnerMapping: Record "CCS DIS Partner Mapping"; var SentMessage: Record "CCS DIS Partner Sent Message")
The event is fired after the partner mapping was processed, a sent message created and the XML message written to the record.
The message can have the status delete to be removed later on.
The message can have the status error.
Parameters
| Name |
Type |
Description |
| PartnerMapping |
Record "CCS DIS Partner Mapping" |
The partner mapping that was executed. |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
The created sent message. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnAfterSendMessage
event "CCS DIS Partner Send Adapter" OnAfterSendMessage(SentMessage: Record "CCS DIS Partner Sent Message")
The event is fired after the message was sent to the partner.
The message status can be error if an error occurred on sending.
Parameters
| Name |
Type |
Description |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
The sent message that was sent. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnBeforeAddJsonRepositoryToMessageNode
event "CCS DIS Partner Send Adapter" OnBeforeAddJsonRepositoryToMessageNode(var XmlMessage: XmlElement; var RepositoryName: Text; var JsonRepository: JsonToken)
The event is fired before the JSON repository is attached to the XML message, based on the repository name.
Subscribe this event to transform the JSON repository or add additional custom repositories.
Parameters
| Name |
Type |
Description |
| XmlMessage |
XmlElement |
The XML message to attach the repository. |
| RepositoryName |
Text |
The name of the JSON repository node in the message. |
| JsonRepository |
JsonToken |
The JSON repository. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnBeforeAddXmlRepositoryToMessageNode
event "CCS DIS Partner Send Adapter" OnBeforeAddXmlRepositoryToMessageNode(var XmlMessage: XmlElement; var RepositoryName: Text; var XmlRepository: XmlElement; var InCData: Boolean)
The event is fired before the XML repository is attached to the XML message, based on the repository name.
Subscribe this event to transform the XML repository or add additional custom repositories.
Parameters
| Name |
Type |
Description |
| XmlMessage |
XmlElement |
The XML message to attach the repository. |
| RepositoryName |
Text |
The name of the XML repository node in the message. |
| XmlRepository |
XmlElement |
The XML repository. |
| InCData |
Boolean |
Defines if the XML repository is attached as CData node. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnBeforeProcessAndSend
event "CCS DIS Partner Send Adapter" OnBeforeProcessAndSend(PartnerMapping: Record "CCS DIS Partner Mapping")
The event is fired before the partner mapping is processed. No loop and no initialization has started.
Subscribe this event to initialize custom global variables, like repositories, on partner mapping execution.
Parameters
| Name |
Type |
Description |
| PartnerMapping |
Record "CCS DIS Partner Mapping" |
The partner mapping to process. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnBeforeSendMessage
event "CCS DIS Partner Send Adapter" OnBeforeSendMessage(SentMessage: Record "CCS DIS Partner Sent Message")
The event is fired before the message was sent to the partner.
Parameters
| Name |
Type |
Description |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
|
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnBeforeTryWriteXmlMessageToSentMessage
event "CCS DIS Partner Send Adapter" OnBeforeTryWriteXmlMessageToSentMessage(PartnerMapping: Record "CCS DIS Partner Mapping"; SentMessage: Record "CCS DIS Partner Sent Message"; var XmlMessage: XmlElement)
The event is fired before the XML message is written into the message record.
Subscribe this event to customize the XML message.
Parameters
| Name |
Type |
Description |
| PartnerMapping |
Record "CCS DIS Partner Mapping" |
The partner mapping that was executed. |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
The sent message to write the XML message to. |
| XmlMessage |
XmlElement |
The XML message. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |
OnCheckSendMessage
event "CCS DIS Partner Send Adapter" OnCheckSendMessage(SentMessage: Record "CCS DIS Partner Sent Message"; var SendValid: Boolean)
The event is fired when checking if a message should be send.
Subscribe this event to make custom definition if a message should be send to a partner. Set SendValid to true.
If SendValid is false, the message will be deleted on pre-processing. This is useful for empty messages to avoid unnecessary traffic.
Parameters
| Name |
Type |
Description |
| SentMessage |
Record "CCS DIS Partner Sent Message" |
The message to check sending for. |
| SendValid |
Boolean |
Set to true if the message should be send, to false if the message should be deleted. |
Attributes
| Name |
Arguments |
| IntegrationEvent |
False, False |