Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Bronze Super Contributor
Posts: 141
Registered: ‎02-22-2010

Data Refresh Issue in SLX 7.5.2 Web

Hi All,

 

I have the Below Issue which is Really Killing Me from last Few Days.

 

For Deletion of Accounts in SLX Web we did a Soft Delete  Mechanism where we are Changing the owner to Delete Team if any user other than admin deletes an account. So we have also a Button which is Visisble only to admin where admin can see for deleted accounts by any other user.

 

 Every thing is Working fine except the Refresh issue.

 

When User  MOves to Detail View of a Deleted Account we have a Label Marking this is a Deleted Account. But this will only Appears to the Admin when we did Refersh for more than 8 Times. We have following Code on Page Load of Acocunt Details but still Doesn't Work Please Suggest

 

Sage.Platform.WebPortal.Binding.

WebEntityBinding OwnerLookupResultValueBinding = new Sage.Platform.WebPortal.Binding.WebEntityBinding("Owner", Owner, "LookupResultValue", "", null);

BindingSource.Bindings.Add(OwnerLookupResultValueBinding);

 

 

 

Sage.Platform.WebPortal.Services.

IPanelRefreshService refresher = PageWorkItem.Services.Get<Sage.Platform.WebPortal.Services.IPanelRefreshService>();

 

if(refresher != null)

{

refresher.RefreshMainWorkspace();

refresher.RefreshAll();

}

refresher.RefreshMainWorkspace();

refresher.RefreshTabWorkspace();

refresher.RefreshAll();

Owner.DataBind();

this.Refresh();

Sage.Entity.Interfaces.

IAccount account = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount;

Sage.SalesLogix.Security.

SLXUserService usersvc = (Sage.SalesLogix.Security.SLXUserService)Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Security.IUserService>();

Sage.Entity.Interfaces.

IUseruser = usersvc.GetUser();

 

stringusername = user.UserName;

 

if ((username == "ADMIN") && (Owner.Text == "Delete Team"))

{

undeletebtn.Visible = true;

undelete_lbl.Visible = true;

}

else

{

undeletebtn.Visible = false;

undelete_lbl.Visible = false;

}

 

 

The Above Code Doesn't seem to be work because the Owner Look up is not getting refresh even though in the back end the seccodeid value is every one. It is Still Showing the Same Old Value for Owner and after refershing for 10 Times it is APpearing the New Value. Please Suggest

 

Bronze Super Contributor
Posts: 236
Registered: ‎03-30-2009

Re: Data Refresh Issue in SLX 7.5.2 Web

[ Edited ]

Rather than using the controls, use the entity on the page instead.  Something like this in the quickformload event should be all the code you need to do this:

 

    Sage.Entity.Interfaces.IAccount a = this.BindingSource.Current as Sage.Entity.Interfaces.IAccount;
   undeletebtn.Visible = (Sage.SalesLogix.API.MySlx.Security.CurrentSalesLogixUser.UserName.ToUpper() == "ADMIN" && a != null && a.Owner.OwnerDescription == "Delete Team");
   undelete_lbl.Visible = undeletebtn.Visible;

Mike LaSpina
Professional Services Consultant

Sage
8800 N Gainey Center Dr Ste 200
Scottsdale AZ 85258
Tel: 480-383-5344
Cell: 480-321-6637
Fax: 480-556-4090
mike.laspina@sage.com

Your Business in Mind.