I have a plugin, in which I am using a fetch query, it worked fine.
However the scope has changed and in the fetch statement, i need to update the following line, to retrieve the record where the "accountuniquenumber"'s last 7 digits match not the full value.
I know i need to update the following to sections but not sure to what, can i retrieve just the last 7 digits and then make the condition so it ends in?
- if (Target.Attributes.Contains("cr011_accountuniquenumber"))
UniqueNumber = Target.Attributes["cr011_accountuniquenumber".ToString();
- <condition attribute='cr011_accountuniquenumber' operator='like' value='%{2}' />
Entity Target = context.InputParameters["Target"] as Entity; try { string AccountName = "", UniqueNumber = "", ZipCode = ""; if (Target.Attributes.Contains("cr011_accountname")) AccountName = Target.Attributes["cr011_accountname"].ToString(); if (Target.Attributes.Contains("cr011_accountuniquenumber")) UniqueNumber = Target.Attributes["cr011_accountuniquenumber"].ToString(); if (Target.Attributes.Contains("cr011_address1zippostalcode")) ZipCode = Target.Attributes["cr011_address1zippostalcode"].ToString(); #region FetchAccounts string AccountsFetchQuery = @" > ";