on 11-17-2009 5:35 PM
Hello,
I've been reading in the forum, that it's not possible to update Batch Details because there's no DI object to do that.
Someone has suggested that we can do that using UI, simulating clicks and key entries!
We could do that if in the Batch Details form the Warehouse field was available, but it is not!
So, if we don´t have the chance to update Batch Details via DI object or UI "clicks and key entries", is it admissible that we can use Update Recordset?
Regards
Júlio Pinho
I know this is an old post but I faced the same issue.
You can update Batch Details Screen from DI-API using the "CompanyService" object. Below is a sample C# code to update expatriation date.
public void UpdateExpDate(int absEntry, DateTime newExpDate)
{
// Initiate Company Obj
Company comp = new Company();
comp.Server = this.server;
comp.DbServerType = BoDataServerTypes.dst_MSSQL2008;
comp.UseTrusted = true;
comp.CompanyDB = this.companyDb;
comp.LicenseServer = this.licenseServer;
comp.UserName = this.sboUser;
comp.Password = this.sboPwd;
if (comp.Connect() != 0) { throw new SystemException(comp.GetLastErrorDescription()); }
// Initiate objects
CompanyService compService = comp.GetCompanyService();
BatchNumberDetailsService bNumService
= compService.GetBusinessService(ServiceTypes.BatchNumberDetailsService);
BatchNumberDetailParams bNumDetailParams
= bNumService.GetDataInterface(BatchNumberDetailsServiceDataInterfaces.bndsBatchNumberDetailParams);
// Set value from OBTN.AbsEntry field
bNumDetailParams.DocEntry = absEntry;
// Initialte BatchNumberDetail obj
BatchNumberDetail bNumDetail = bNumService.Get(bNumDetailParams);
// Set Expiration Date
bNumDetail.ExpirationDate = newExpDate;
// Update
bNumService.Update(bNumDetail);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
7 | |
7 | |
5 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.