cancel
Showing results for 
Search instead for 
Did you mean: 

Success Factors lastModifiedDateTime field from PerAddressDEFLT not giving expected result in CI

Nikhil_Gursal
Participant
0 Kudos
662

Hi Community,

I'm working on scenario where i need to pick Delta changes only from PerAddressDEFLT entity for past records , I have created query but its not giving result based on date defined. If anyone know the cause or faced this issue earlier please help.

Below query is build in Cloud Integration in Success Factors adapter:

$select=homeAddressNavDEFLT/addressType,homeAddressNavDEFLT/startDate,homeAddressNavDEFLT/personIdExternal,homeAddressNavDEFLT/address1,homeAddressNavDEFLT/address2,homeAddressNavDEFLT/country,homeAddressNavDEFLT/city,homeAddressNavDEFLT/customString1,homeAddressNavDEFLT/lastModifiedDateTime,homeAddressNavDEFLT/zipCode,homeAddressNavDEFLT/stateNav/externalCode&$expand=homeAddressNavDEFLT,homeAddressNavDEFLT/stateNav&$filter=homeAddressNavDEFLT/lastModifiedDateTime ge datetimeoffset'2023-11-23T00:00:00.000' and personIdExternal eq '12345' &fromDate=1900-01-01&toDate=9999-12-31

The result should be record whose lastModifiedDateTime is greater than or equal to date 2023-11-23T00:00:00.000

Below is result :

<PerPerson>
	<PerPerson>
		<homeAddressNavDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>X0E 0Y0</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>NT</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-21T12:01:27.000</lastModifiedDateTime>
				<customString1>105</customString1>
				<address2>Test</address2>
				<city>Behchoko</city>
				<addressType>Mal</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Box 370</address1>
				<startDate>2023-11-21T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>X0E 0Y0</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>NT</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-21T12:01:27.000</lastModifiedDateTime>
				<customString1>105</customString1>
				<address2>Test</address2>
				<city>Behchoko</city>
				<addressType>Mal</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Box 370</address1>
				<startDate>2023-10-01T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-22T07:40:56.000</lastModifiedDateTime>
				<customString1>50</customString1>
				<address2/>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>1503 Hummingbird Court</address1>
				<startDate>2022-10-01T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-21T13:47:23.000</lastModifiedDateTime>
				<customString1/>
				<address2/>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Test_1503 Hummingbird Court</address1>
				<startDate>2023-09-01T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-22T10:11:25.000</lastModifiedDateTime>
				<customString1/>
				<address2>Test2</address2>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Lates_Test_1503 Hummingbird Court</address1>
				<startDate>2023-10-01T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-22T10:11:25.000</lastModifiedDateTime>
				<customString1/>
				<address2>Test1</address2>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Lates_Test_1503 Hummingbird Court</address1>
				<startDate>2023-11-21T00:00:00.000</startDate>
			</PerAddressDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-23T13:13:56.000</lastModifiedDateTime>
				<customString1/>
				<address2>Eagle's Eye</address2>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Lates_Test_1503 Hummingbird Court</address1>
				<startDate>2023-09-15T00:00:00.000</startDate>
			</PerAddressDEFLT>
		</homeAddressNavDEFLT>
	</PerPerson>
</PerPerson>

Expected result:

<PerPerson>
	<PerPerson>
		<homeAddressNavDEFLT>
			<PerAddressDEFLT>
				<country>CAN</country>
				<zipCode>L1V 7H9</zipCode>
				<stateNav>
					<PicklistOption>
						<externalCode>ON</externalCode>
					</PicklistOption>
				</stateNav>
				<lastModifiedDateTime>2023-11-23T13:13:56.000</lastModifiedDateTime>
				<customString1/>
				<address2>Eagle's Eye</address2>
				<city>Pickering</city>
				<addressType>home</addressType>
				<personIdExternal>12345</personIdExternal>
				<address1>Lates_Test_1503 Hummingbird Court</address1>
				<startDate>2023-09-15T00:00:00.000</startDate>
			</PerAddressDEFLT>
		</homeAddressNavDEFLT>
	</PerPerson>
</PerPerson>

Similar query is working for EmpJob entity , not sure if it supports for homeAddressNavDEFLT.

Thanks in advance.

Nikhil

Accepted Solutions (1)

Accepted Solutions (1)

Nikhil_Gursal
Participant
0 Kudos

Hi ,

Able to achieve this by applying filter in Groovy with below condition , and passing this as property in adapter.

    if(flag.equals("Delta"))
    {
     
        filter = "(lastModifiedDateTime ge '"+value+"' )"
      
      
    }

Answers (1)

Answers (1)

nlgro023
Active Contributor
0 Kudos

I'm either guessing it could be the format (I commonly format a date as follows for an odata call: employmentNav/startDate ge datetime'1900-01-01T00:00:00Z') or it could be due to the amount of records in address info.
Address info (on each effective date) has a certain amount of entries, so if there are in fact as many entries on a specific effective date, the API may get the impression that it all belongs together.

Nikhil_Gursal
Participant
0 Kudos

Thanks for response Groot.