Groovy to capture response of getOrganization and pass party site id to mergeCustomerAccount
Summary: Hi Team , having requirement to capture response of getOrganization and pass party site id to mergeCustomerAccount
Content (required):if (ApprovalStatus_c == "APPROVED")
{
def organizationParty =[
PartyId :PartyId,
PartySite: [[
LocationId : 300000085292375,
CreatedByModule :"ZCH_USER",
PartySiteUse:[[
SiteUseType : "BILL_TO",
CreatedByModule :"ZCH_USER"
]]
]]
]
def org1= "test"
println("Test = ")
organizationParty = adf.webServices.OrganizationCreationWSDL.mergeOrganization(organizationParty)
println("Party is merged = "+ organizationParty())
//Comments = organizationParty.PartyId
//def partyvid = PartyId
// setAttribute("Debug_c",org1)
//def accountService = adf.webServices.Account.createAccount(account)
def actlist = organizationParty[0].Value.PartySiteId
if (organizationParty != null)
{
// def org1= "test"
def wsResponse = adf.webServices.OrganizationCreationWSDL.getOrganization(partyId)
// def partysiteId = wsreponse.'**'.findAll { it.name() == 'PartySiteId' }
def PartySiteId = wsResponse.first().PartySite.first().PartySiteId